-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make numbered browser tabs clickable by voice #2864
Comments
For now, it looks need to create a helper addon inserting a clickable link via TST's API https://github.com/piroor/treestyletab/wiki/Extra-Tab-Contents-API and listen events on them.
You can hide it via the custom user styles like: tab-closebox {
display: none !important;
}
If you inserted it via custom user styles, you need to change some style declarations. Which is the one do you use? Currently TST builds tab UI with no HTML link, because there was no reason to make them detectable from someone outside of TST. If the software Dragon Professional Individual allows you to click any link in TST's sidebar, I think I need to render TST's tabs as HTML link for better accessibility. |
I've experimentally introduced a change to make tab labels clickable link. You can try a development build as an artifact of https://github.com/piroor/treestyletab/actions/runs/762405117#artifacts , could you confirm those tab labels are detectable and clickable from Dragon Professional Individual? |
Here is another development build using ARIA role "button" for each tab. |
Piroor, thank you so much for doing this – for answering my call, and acting so quickly. I am really happy that I raised this request. You have just about solved a long-standing problem for me and, I hope many others too. There are still a couple things I’d like you to look at further, so please see the details below. P.S. I hope this is not too long – I just wanted to make sure I covered as much as possible to help you understand in going forward with future development. I hope it is useful.Artifact 1I was not able to voice-activate these tabs. Is there something that you implemented and that I need to be saying to do this?Manually clicking and holding shift to select multiple tabs in TST tab pane (I have 20 in the original window which you cannot see here, like the image I uploaded yesterday) causes a new window to open, as per the above image. Left hand side zoomed in: Right hand side zoomed in:Artifacts 2 & 3Generally, these work well, and I activated both by simply saying the numbers as I could see them. I am not sure if by “label” or “ARIA” this meant you had included a voice-clickable label that is different to the tab titles shown. I could not see this if this was the case. Please explain further if I have misunderstood this.Unfortunately, I am unable to illustrate the issues that I had with these artifacts with images because, as soon as I tried to create a screenshot, the flags created by Dragon would disappear. I will try to describe some of the effects that I observed with both artifacts:
I expect that there will be other Dragon related quirks that I have not yet identified, but I think this underlies the need for targeting the tabs more closely if possible. (update: following my CSS modification – see further below - I feel this is much less likely to be a problem now). I have tested over 125 different tabs opened for this test run in number order from 1 onwards and, for the most part, with the exceptions noted above, it runs very smoothly and elegantly. Of the two, I think the ARIA version (Artifact 3) seemed to have the edge over Artifact 2 although, other than it seems more reliable and a bit quicker, I cannot really explain why. They were both subject to similar issues to one degree or another. That said, I did have to restart the computer at one point and when I retested Artifact 2, its performance dropped significantly. So far, the ARIA version seems to be performing well between restarts. Neither of these versions reproduce the issue of the first artifact where manually selecting multiple tabs induces the new window issue seen in the image above (which is good!).Hierarchical TabsArtifacts 2 & 3 do not work so well with hierarchical tabs. This is because the counter enumerates visible tabs only and collapsing and expanding parent tabs causes the counter to be reset each time. Consequently, when a user tries to voice-click a parent/independent tab further down from the current child or parent tab selected, the user will end up further (i.e. equal to total # of children of the previous parent) down the tab list than intended and will have to issue an additional command to correct this. However, hierarchical tabs will probably work very similarly to the flattened alternative (as I am using) if the tab groups are all expanded and made non-collapsible.Removing “X” Close Tab Symbols
Moving Tab Numbering to RHS
Additional CSS Modification by MyselfDue to the problems that I was having with certain number recognition in Artifacts 2 and 3, I further tweaked the CSS via the advanced section of TST’s options in Firefox. I followed the example of your tab numbering code to add in the word “tab”, change the word “::after” to “::before”, and then set the opacity to 0% to hide it. It is probably not as “clean” a solution as you would like it to be from a programming point of view, but it works well to resolve this issue between “for” and “4”, etc and in effect, ensures tabs are targeted much more accurately while forcing number recognition. I will leave it to you to decide if it needs tidying up for future public release!So, for now, I have added the following to the end of my CSS customisation:
Voice-Right-Click Context MenuMoreover, an excellent unanticipated bonus and one that I am delighted about, is that I can now voice-right-click tabs as well. Unlike before, I am now able to perform all the other functions of multiple extensions sharing the same tab context menu. This is because your new code focuses the mouse pointer over the tab when it is voice-clicked. Voice-Scrollable TST Tab Pane/Voice-Clickable ScrollbarAs expected, only the tabs visible to the user are voice-clickable, which means the user needs to scroll up/down separately to see other tabs to voice-click them. In this respect, I have another related request, which I hope will not be too much trouble… With Dragon, I can issue a command to drag the mouse down or up, dragging an object with it. If I manually hover the mouse over the TST scrollbar and issue this command, the TST scrollbar will move up and down accordingly. This is the only method I can use right now, which can be difficult for some users, including myself. Alternatively, when the main browser page has focus, I can simply issue a command to “start scrolling up” or “start scrolling down”, or “Page Up”, “Page Down”, and “# Line(s) Up/Down” and the page will immediately respond accordingly, without the need for dragging and completely hands-free. I currently cannot do any of this with the TST pane.
|
Hi Piroor, I'd like to just add another thought here. I'm able to fit 30+ tabs vertically in clear view down the right-hand side of the screen. With so many active tab page titles and lots of links in the main browser page, it is possible for Dragon to click a page link rather than the intended tab page title instead, and vice versa, especially if the tabs are of a subject related to the page you are currently reading. This is why the numbering is useful, and it helps to mitigate against unspeakable tab titles (i.e. user-unfriendly code-like strings such as document/file paths/names, which can be difficult to manage with Dragon for the average user). In this respect, it would be very practical to optionally be able to deactivate TST Tab title links, and rely on the tab counters to access tabs, leaving one free to speak any web page links without fear of Dragon clicking unintended tab title links to elsewhere. When this happens, there is always a sense of "what just happened, where am I, where was I, how do I get back?" type thinking and sometimes it can take a while to sort it out. Dragon is very fast, and this happens in the blink of an eye, so is difficult to track.
Many thanks again. |
Thank you for testing! Finally I've decided to revert changes to embed links. Thus finally ARIA-role is applied on the next version. WAI-ARIA is a specification about Web application accessibility, which gives hints for screen reader and similar other applications to control UIs built on HTML. I'm very sorry I didn't write ARIA role on my addons because I thought that TST is strongly depends on its visual UI and it is not suitable to be used with any accessibility software.
That was caused because the tab label link is built as an HTML link element like
I think that those problem may be caused by Dragon side. TST just declare each tab as a controllable button, and there is no code applying special things for tabs with some specific numbers.
TST's twisty (the small chevron to toggle tree expanded state) and close button in each tab didn't have any accessibility information. With recent commits now those buttons have a role "button" and labeled for accessibility applications. I hope that these changes make them voice-clickable. Here is a development build: https://github.com/piroor/treestyletab/actions/runs/770179253#artifacts If this change breaks accessibility of tabs actually, I need to plan something more changes to make both in-tab UI and tabs voice-clickable. For example: giving "button" role for tab labels, not tabs themselves.
I've tried the CSS and I just had to change one line in the last declaration: tab-item .extra-items-container.behind::after {
(snip)
/* left: 0.1em; *//* removed */
right: 0.1em; /* added */
(snip)
}
Hmm, sorry I don't know how to do that... |
I've applied more changes to TST to provide accessibility information. Current definitions:
I've tried Windows 10's "narrator" feature to test accessibility. With these attributes tabs and in-tab buttons became focusable. But I'm not sure that Dragon recognizes these information. Here is a development build: https://github.com/piroor/treestyletab/actions/runs/770820371#artifacts |
After more trials I've understood that tabindex=0 of UI elements in the sidebar steals focus while you press the Tab key to move focus between links and buttons. It looks very annoying and breaks user experience, so I've removed all tabindex attribute from UI elements. Currently applied accessibility information are:
I'm afraid that both label with role=button and tab with role=option are recognized by Dragon and it possibly break user experience more, so I need more testing. The development build with roles described above is: https://github.com/piroor/treestyletab/actions/runs/771015894#artifacts |
I've tried another screen reader NVDA, and confirmed that it can detect tabs and in-tab buttons as operatable objects in its "object navigation" mode. From this result I think that Dragon also lists tabs and in-tab buttons clickable. |
Before implementing this kind option, could you try a newer (latest) development build? With recent changes, now TST's tab bar may be detected as a selectable list (like Firefox's bookmarks sidebar), by other applications. Indeed when I tried Windows 10 narrator, it said like "tab, 40 of 50" for 40th tab in a window containing 50 tabs. If Dragon also provides any way to choose specific index item in a listbox, it can help you to move focus to any tab quickly. |
Hi Piroor, I have tested all the artefacts now. I had some issues with my computer/software and then ran into problems with the artefacts behaving differently. So, I will go over it again to be sure before coming back to you. Before I do, I just need to ask whether the existing TST extension should always be removed, and firefox restarted, before installing the next one? Would this make any difference? I'll try to do all this over the weekend. Thank you for your patience. |
I think you don't need to uninstall old experimental builds. Steps to try are:
|
You can download each experimental build for every commits: https://github.com/piroor/treestyletab/actions |
Thank you. I tried the uncheck "Optimise tree restoration with cache" setting, only this didn't work; the tree disappeared and I couldn't get it back at all until I re-checked the box and reloaded the tree again. One more thing I want to ask you before continuing, are there any specific keywords that I need to say (to Dragon) to activate these controls? (I have tried words like "button", "twisty", "list item", "chevron", "toggle", "expand tree", "collapse tree", etc - similarly for the tab titles, and numbers). I have been trying a range of different words, and mostly it doesn't work. I'm going to retest everything again, because the tree still isn't working with Dragon currently, whereas I had previously got some response in one or two of the artefacts, and voice-clicking tabs had worked well. |
Hmm, deactivating "Optimize tree restoration with cache" just means that TST always build its UI from scratch. Such a full build is slow but safe on most cases, opposite building UI with a cache is fast and unstable... OK, anyway I've added a new option to change accessibility role of tab elements. You can change it via TST options => Development => All Configs =>
Currently the tab label is the only one readable text in each tab. Twisty has its |
Hi Piroor, Is there a way we can make this easier, please? I've tried multiple times now to test and report on the testing but, actually, I'm finding it too challenging. There is a lot of inconsistency between repeat test runs on the same artefacts, which is confusing me. Also, I'm trying to assess Twisty buttons and tabs, and both seem to have a number different and overlapping behaviours associated with them, which I'm not all that conversant with in trying to pick apart. I'm also struggling with being concise, and not overload with too many words (which is a problem for me anyway, even if it isn't for you!). So I also tried devising some data/spreadsheet to get round this, but my lack of inside knowledge on how the Tab Pane runs really makes that harder, plus, as I said before, the betwen test inconsistency throws me. I have a limited amount of energy and ability to concentrate due to disability and, apart from day-to-day life generally, have also run into software battles, micophones etc not behaving properly, which has absorbed a lot of my time. It's working OK now, although I don't think Word is going to play so nicely still, resulting in me getting keyboard heavy, which I desperatly need to avoid! I really want to help, not just for myself, but for anyone else whom this would benefit. If we can prioritise the artefact and the aspect you'd like feedback on first, that might be more doable for me. And then, gradually work through it that way as needed. Does that sound OK to you? |
Finally I've given up to debug remotely and bought the license of Dragon Home... Now I'm testing interactions on my PC. |
Oh, wow! Thank you! I wish you didn't have to do that, but I really appreciate your effort to help. I was just writing up some general observations on attempting to voice-click tabs and how the webpage can interplay with it etc. I'll post this anyway, later tonight/tomorrow. As for specific tab and twisty behaviours, I'm still happy to test but in a more step-by-step process. Just let me know. Thank you Piroor, you're a star! |
After some trials I've understood following things:
So, I've applied some changes:
The experimental build with these changes is available at: https://github.com/piroor/treestyletab/actions/runs/806660404#artifacts On this revision, I've successfully click in-tab buttons via Dragon with a user style: #tabbar {
counter-reset: vtabs atabs tabs;
/* vtabs tracks visible tabs, atabs tracks active tabs, tabs tracks all tabs */
}
tab-item:not(.collapsed):not(.discarded) {
counter-increment: vtabs atabs tabs;
}
tab-item:not(.collapsed) {
counter-increment: vtabs tabs;
}
tab-item:not(.discarded) {
counter-increment: atabs tabs;
}
tab-item {
counter-increment: tabs;
}
tab-item,
tab-label,
tab-twisty,
tab-closebox,
tab-sound-button {
-moz-user-focus: normal !important;
}
tab-item:not(.faviconized) .extra-items-container.front::after,
tab-item.faviconized tab-favicon::after {
content: counter(vtabs);
background: Highlight;
bottom: 0.2em;
color: HighlightText;
font-size: x-small;
right: 0;
padding: 0.2em;
pointer-events: auto;
position: absolute;
user-select:text;
-moz-user-focus: normal;
z-index: 1000;
}
tab-label::after,
tab-twisty::after,
tab-closebox::before,
tab-sound-button::before {
max-height: 0;
max-width: 0;
opacity: 0;
pointer-events: auto;
position: absolute;
user-select:text;
-moz-user-focus: normal;
}
tab-label::after {
content: "Tab " counter(vtabs);
}
tab-twisty::after {
content: "V" counter(vtabs);
}
tab-closebox::after {
content: "X" counter(vtabs);
}
tab-sound-button::after {
content: "M" counter(vtabs);
} The last four declarations define "invisible clickable label" for each button. When I say "click tab 4", the tab label of the 4th tab is clicked and I successfully select the tab. When I say "click V4", the twisty of the 4th tab is clicked and I successfully toggle the tree under the 4th tab collapsed/expanded. My pronunciation is strongly accented and Dragon isn't trained well for Japanese accented English so it was very hard for me to control tabs via voice commands, but hidden labels added with the custom user style are detected as expected when Dragon correctly detected my voice. |
On the other hand, scrolling problem is not resolved yet. I still don't know how to scroll the sidebar via Dragon. Maybe we need to implement something buttons to scroll the sidebar contents, if Dragon doesn't support operations on scrollable HTML elements. Leastwise I couldn't scroll it via voice commands like "scroll up/down". |
Hi Piroor, This is great, I am still testing most of this. I just wanted to step in quickly and let you know that you have already partially solved the scrolling problem! I am still learning about Firefox and its hidden areas. I only discovered the extension shortcuts panel a week back and was quite amazed to see that you already have commands for Page Up and Page Down, as well as Line Up and Line Down, which all act on the tab pane. I have tested them, of course, and they work. Perfect! I can easily convert "Alt Shift PageUp" and "Alt Shift PageDown" into accessible voice-commands such as "Tabs PageUp/PageDown". I am not sure that Home version users will be able to do the same, but you can check this. They may still need to say, "Press Alt Shift Page Up/Down", which is bit of a mouthful, so if you can reduce its verbal complexity to a more concise shortcut, this will help those users greatly. In Firefox, if you watch how the command "Start Scrolling Up/Down" functions for a webpage (using Dragon's Firefox extension), I think you will probably agree that this is likely a "Move Up/Down # Lines" at-a-time type command set into a loop until the user says, "Stop Scrolling". There is a setting in the options somewhere, where the user can decide how many lines up/down it should occur at its base rate (this may be a mouse device setting). There are also secondary commands (i.e. "Scroll Faster/Slower") that users can say while it is still scrolling which increase or decrease the scrolling speed. At its slowest, you can see it going up/down # lines at a time. At its fastest, it appears to scroll up and down smoothly. So my guess is that if you can create a script that repeats in a loop until instructed to stop, perhaps aided by a hidden "Stop Scrolling" button (?!), you could possibly emulate this in the tab pane. This probably is not the best method, but it is the only example that Nuance has provided in their own web extension for scrolling webpages! I still think being able to focus the tab bar and drag it up and down would be better but, although basic testing indicates it is draggable on receiving (hovering) focus, that is well beyond me to explain further! That said, I think I will find the "Page Up/Down" option useful anyway, and I can modify it further to say "Tabs Page Up/Down # Times" as needed. It is quicker than the current webpage scrolling function, where you must sit and wait for it to eventually get there. NB Shortcuts are extremely useful in Dragon - if you can set a shortcut for something, it is quite likely users can access it directly by voice or, better, create a more suitable voice-command for it! (The one exception is the FN key, which Dragon users can never access by voice). Hope this helps, I will get back to you about the rest of it later, Thank you again! PS I do not know if you are using the Dragon web extension. This may make a difference to testing performance and most users, if not all, will be using it because there is still little voice-activated webpage functionality within Firefox otherwise (despite initial appearances without it; just try it!). It looks like Firefox is improving over time (the GUI is much improved), but it has a way to go yet. Objects in the webpage can easily conflict with tab functions in the tab pane when using Dragon and vice versa, depending on what the user is doing and the range of focusable/clickable objects in the webpage and tab panes at the time. This is part of what I was going to send over today, so I will do that shortly. The link for Dragon’s Firefox web extension is here: PPS Here in the UK, Nuance sells the software under a 30-day trial period (I think both Home and Professional versions). If you decide it is not for you, they will refund you, no questions asked. They were very relaxed about it, as was my personal experience previously, before I finally committed to it after several separate trials. I hope they have a similar sales policy wherever you are, should you need it. |
Thank you, that's exactly what I was looking for! |
I'll figure this out, thank you. |
Actually, thinking this idea through a bit more, I think accessbility should remain inherent and, ideally, a mandatory requirement within all extensions created. In common with many people, I have numerous extensions, and installing add-on accessibility modules per core extension would likely become problematic. |
I don't know if it may help, but this UK site's product details pages (unlike much of the rest of the same site) is fully accessible to me as a Dragon speech user.
My feeling is that what makes this page accessible is what would make TST accessible if implemented similarly. That some webpage links are accessible without the Dragon extension installed (I can navigate links this way but not always), "Toggle", "Close", and "Item" are also already available within TST, and TST is (I believe) treated as a webpage, suggests this to me. Here, I'm assuming it is possible to view the site's underlying code to understand how its accessibility works, so my apologies if that is incorrect. |
Hi Piroor, hope you're well - a quick update... Currently only:
are working reliably (although "Item #" can still fail due to hovering effects). I've since lost all access to:
whereby TST panel just closes now, instead of all "Close tab" hover elements being flagged by Dragon. I don't know what further to add, as I think I said everythning before! I hope it's of some use though.... Thank you |
Hmm... I still cannot understand why "Close" is inaccessible. Moreover, very sadly Dragon no longer detect any labels around TST's sidebar on Nightly 93 on my environment even if I use CSS hacks copied from the wiki page. I've gotten stuck completely... |
Oh! Your latest push 3.8.9 updated last night while I was busy online. Took me a while to work out what suddenly happened in that split second. Nice update. It's useful in other ways though!
This is checked in Firefox 90.0.2 |
Can also now confirm that in Firefox (developer edition) 92.0b5, none of the TST user commands are working. I see that Firefox is making changes although, as a non-coder, I don't understand what implications this may have. Is this likely to be the reason that TST is no longer voice accessible? (Even the tab URL titles cannot be accessed by voice) I had thought that they were moving towards an accessible framework! |
OK, now things are different... I think there may be an issue with the updating process itself, either Firefox or extensions, or both!
In truth, I am not really sure what's going on here. |
This issue has been labeled as "stale" due to no response by the reporter within 1 month (and 7 days after last commented by someone). And it will be closed automatically 14 days later if not responded. |
Hi Piroor, I'd like to keep this open, should anyone be able to contribute a possible solution, please? Accessibility is still so important. |
Sorry for my silence, I' ll be back at next month... |
thank you |
Tree structure information stored in Firefox's session data looks transferable with copying On my case, I usually clear cache data from the profile, when I encounter odd problems. For example:
|
Thanks Piroor, With each FF update, previous profiles other than the current one become out of date. This then requires me to create new profiles for each of them, before copying the contents of their respective old profile into the new replacement profile. As I struggled to keep up, I now have an excess of profiles, and management has become difficult. Sorry, I don't understand how to action this:
Would you mind explaining in a little more detail, please? Thank you again |
I just meant that I remove those 4 files/folders to "refresh" my profile when I saw problems. On Windows:
In other words, I ordinarily don't refresh my profile truly, because problems I saw almost gone away with this partial refreshing. If something serious problem happens and it forces me to recreate my profile, I'll use Firefox Sync simply. I'll just create a new profile and log in to Firefox Sync, and wait until all preferences, bookmarks, histories and extensions are restored. And I may combine saving existing tabs to a bookmark folder instead of migrating session data. Steps:
This method will lose some information but I agree to give up to migrate all of profile data, for safety and stability. |
This issue has been labeled as "stale" due to no response by the reporter within 1 month (and 7 days after last commented by someone). And it will be closed automatically 14 days later if not responded. |
Please keep open! Thank you for you latest replies. I hadn't spotted these, so busy with other things. I'll follow that up soon. |
This issue has been closed due to no response within 14 days after labeled as "stale", 7 days after last reopened, and 7 days after last commented. |
This issue has been labeled as "stale" due to no response by the reporter within 1 month (and 7 days after last commented by someone). And it will be closed automatically 14 days later if not responded. |
This issue has been closed due to no response within 14 days after labeled as "stale", 7 days after last reopened, and 7 days after last commented. |
[feature request]
Problem Identified:
I am reliant on voice recognition and struggle to access browser tabs easily by voice. Dragon Professional Individual has not implemented a way to achieve this in its add-on extension for Firefox and there is no Firefox ActiveX component available for Dragon’s advanced scripting.With Dragon (see numbers on image for reference):
My attempt at a workaround within the Dragon environment is to implement a command that performs “Ctrl 1” and then iterates down the tabs with “Ctrl Tab” until the tab I want is reached. It works, but not always and it is inefficient and resource intensive, and often gets stuck due to pages reloading on the way down. As another example, I had also tried commands such as saying “Ctrl 123” but this merely resulted in the “Ctrl 1” outcome, and similarly for all other numbers over 9.
Feature Request:
I have been using Tree Style Tab extensively, it’s a great extension and I find it really useful. As you can see, I have flattened the hierarchy as this better meets my needs with voice recognition, and I have inserted some of your code snippets for tab counting and numbering.With Tree Style Tab (again, refer to numbers in image):
I should add that I have next to no programming ability at all; most of what I do is tweaking what's already there to make it work for me. It’s really basic and usually more “miss” than “hit” but I try!
I’d really appreciate your help to resolve this issue. Thanks for making such a great extension!
The text was updated successfully, but these errors were encountered: