-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
List should announce how many items are selected #91061
Comments
The issues seems to be that the |
Please, cause announcement only in teh followin example use cases:
Never announce selection or item position in places where the list pops up automatically such as intelisense suggestion list.
And now imagine, you have to hear X of Y all day long when you are coding and intelisense widgget popsup. A possible alternative, which would also trigger checkmarks in braille would be using aria-checked with similar announcements. Will be very happy to test it - I just want to make VS Code the perfect IDE. |
@pawelurbanski thanks a lot for the feedback and for the help. If there is unnecesery output in inteli-sense we can fix it on the inteli-sense level (it can override how the tree sets roles). |
@isidorn Wanna look into this? |
@joaomoreno sure, assignign to next milestone. Since you will be out I might just merge if the fix is simple. |
If attributes will be set correctly screen reader will do this job. It is announcing the change of state from unselected to selected.
The number of selected item is not an issue, therefore do not use alerts to announce it. I guess that the use case will be to select a handful of items. If there will be the need for more, selecting all will be more frequent action or going the container route. For example using a folder or expanded node of a tree to select it and the objects contained to perform the action.
|
The VS Code list has both selection and focus, and an item can be focused and not selected. I have looked into this and did the change that Actually the expeirence gets worse on NVDA, since with these changes when focus moves NVDA would announce that each item is not selected. @LeonarddeR on potential ideas on how to set aria-selected that NVDA reads everything properly PR work in progress #92019 |
What would be a few example use cases? Maybe we don’t need such precise behavior?
For example: if the case is to select a few items to perform some batch action, we could try to do a bit of a hack and apply the: aria-checked attribute or aria-selected for that matter.
The user would get very precise feedback about the items to which the action would be applied.
The shortcut rule of thumb is that if some item was spoken and additionally displayed on a NBraille display if one is using it, it is something with focus – all the other states are additional information.
On a side note: I do not rcall if the number of selected items is announced in regular contexts such as: Windows explorer list with files selected and so on – will check with different NVDA settings when it comes to verbosity.
|
There is this best practise, example 2. This one also doesn't select on focus and you can select the entries with space. Where in VS Code can I find a multi select list, so I can investigate the behavior? I think there are two types of multi select lists:
|
cc @zersiax |
@LeonarddeR a multi select list is the Explorer. Just hold down shift and you can select mulitile items. I will check out the best practise example 2. |
With my PR we actually follow all the best practises of example 2. Except that we use the
|
@isidorn: I was going to suggest using ARIA's Does your PR cause Orca to present things as you'd expect? Or do you still need my help? |
This confuses me. Are we working with a list or a tree? Are we working with listitems or treeitems? What this example doesn't implement is selection, but a TreeItem is a child of a ListItem, so that's supported just fine by the spec. |
I'm wrong, aria-multiselectable is allowed on tree indeed. |
@joanmarie @LeonarddeR Orca and NVDA do not announce selection properly IMHO. Open the native explorer, select mutliple items and note how Orca on Linux does not announce that mulitple items are part of the selection. NVDA has the same flaw with Windows Explorer. The screen readers do not announce state of selection. They only announced the focused item. IMHO vscode does everything proper on our side with all the aria attributes in our trees and lists, however since NVDA and Orca have issues announcing selection in native Explorerer we can not expect that it works well for the VS Code explorer (which is a tree btw). Hope this makes sense. |
When it comes to NVDA and Orca it comes to the matter of verbosity. Hearing that you selected 3 items, which you already did does not make sense. Getting information that X and Y are selected when you scroll through some list of items can be helpful indeed. The case is when you cherry pick just a few files or commits in a branch.
|
"Contained in" seems to suffer from the same problem that "owned by" does. We have an issue for the latter, so I just added a comment mentioning "contained in". w3c/aria#748 |
Yeah that is why I filed this bug:
Since you reopened this bug, I won't file another. Unless I'm misunderstanding you. |
@joanmarie Yeah, no action needed, I missed that you were the one who just opened the Chrome bug. Thanks for doing that! |
In VS Code Insiders, I can now get the actual number of selected items, this is great. I will look into making this work more smoothly in NVDA by means of a pull request. |
@LeonarddeR great thanks! |
@isidorn Is there an accessible way to inspect de html tray that's being generated by the VS Code gui? There seem to be some small inconsistencies with the preferred design pattern that cause item counts to fail. Besides that, it doesn't seem to be possible to get a reliable reference from a child node of the tree view to the tree view itself. In the IA2 tree, all children have the tree view as their direct parent, but that's not in line with how the aria best practises tree view behaves. |
@LeonarddeR the only way to inspect the generated HTML is via Chrome dev tools. However I am not sure how accessible they are. Can you try it out and if it is not good let me know and i can help Can you elabore on your second point, what is exactly not in line with aria best pracites regarding our tree? Is it that |
Is this discussion the reason why the settings tree doesn't speak with Orca? It appears that the focus and selection states are different. For example, Open settings, put focus on the tree, press orca+a to enter focus mode, then try navigating the tree. The result is that Orca fails to speak the new leaf/node name even though the tree item gains focus. Will this get fixed soon? |
@ajborka I have VSCode built locally the other day and Orca master, and Orca speaks the items in the tree. So I think the answer is that it is already fixed. (?) |
I have the latest 1.44 build and the settings tree doesn't read reliably with Orca master. Is there a different build you are using? If VSCode master, how did you build it? |
The point is that information like aria-posinset and aria-setsize only tells the screen reader how many items there are and what number the current item has in the group. It still relies on the several sets (e.g. sub folders) belong into their own group container, as noted in the best practise. At the moment, no positional information other than level is communicated. |
@ajborka you are talking about the settings, that is a special implementation of the list. Can you please file a new issue and ping me on it, thank you. In the meantime as a workaround you can usee the settings in json via @LeonarddeR the current strcuture is |
note: I need to carefully look at the examples I wrote here, I don't think the nesting is correct. I don't have the time to do that yet. @isidorn the problem is not the a>b>c structure and where the role is, but that all children are at the same level in the dom. So, it's now this, right:
It should be something among the lines of:
|
@LeonarddeR oh that we definetly can not change. That is simply how our tree is imlemented - it uses the list and the list is not aware of this. Why can not the screen reader only use the aria level attributes, why does it need the actual HTML structure to be in a tree like form? |
@isidorn <https://github.com/isidorn> : Screen readers depend on the
browser's accessibility tree to convey structural information to a screen
reader. This is why the HTML for the tree must be different than what you
currently use. Just using a list which attempts to use structured nodes
like a tree wont work. I assume it is the same with the settings tree, but
that will get covered in another bug.
…On Wed, Mar 11, 2020 at 8:34 AM Isidor Nikolic ***@***.***> wrote:
@LeonarddeR <https://github.com/leonardder> oh that we definetly can not
change. That is simply how our tree is imlemented - it uses the list and
the list is not aware of this. Why can not the screen reader only use the
aria level attributes, why does it need the actual HTML structure to be in
a tree like form?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#91061 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACN663TN2WHLMJUQUEI6HLLRG6AO7ANCNFSM4KYK6CNQ>
.
|
So, one entry looks as follows:
Would it be possible to add an additional div within every monaco-list-row or monaco-tl-contents div with a role of group that has aria-owns containing a space separated list with IDs of direct descendants? This way, we might be able to convince the accessibility tree that there's a hierarchie. If you don't understand what I mean, I can work out an example in HTML to explain this. |
@LeonarddeR I got what you mean. For that I have created a new feature request #92564 |
Hello, Would it be possible to make it so that screen reader announces selected ones as opposed to "not selected" ones? Right now in order to hear collapsed / expanded status of a folder and hear the level I'm in, I am having to listen to "not selected" in each file / folder even though I am not trying to select anything. It would be much more useful if it were to announce "selected" when something is selected as opposed to announcing "not selected" on every file. See part of my speech history with NVDA below: data not selected collapsed level 2 Version: 1.44.1587431043-insiders (user setup) |
@bkoray hello! This is up to the NVDA screen reader. Can you please file an issue against them? |
Last time I tested, it wasn't possible to get a selection count from IAccessible2 in the explorer, but interesting enough, now it seems possible. However, either I don't undrstand the logic correctly, or something is broken: Steps to reproduce
If my findings are really how VS Code should behave, I think we really need a description of how keyboard navigation behaves in these list/tree view controls, if there isn't any. |
@LeonarddeR correct it behaves just like that. |
Well, in that case I understand the strong desire to know how many items are selected and possibly even which items are. |
The further action planned here, and the upstream issue in Chrome is fixed, so we should soon pick it up and then screen readers should announce how many items are selected in our lists. |
I have checked what native Windows Explorer does with NVDA - nothing.
And what Finder does with VoiceOver on mac - and they announce when the element after the first is added to the selection.
It announces
NAME added to selection 2 items selected
I think we should strive for this experience if possible, so nothing announced if only one item is selected but announce when other items enter the selection
Edit:
We have done changes on the VS Code side however there is still a Chrome issue.
Upstream issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1058961.
The text was updated successfully, but these errors were encountered: