microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.67k stars 29.07k forks source link

List should announce how many items are selected #91061

Closed isidorn closed 3 years ago

isidorn commented 4 years ago
  1. Turn on Screen Reader
  2. Add an element to the List selection such that you have two items selected - Screen reader does not announce that an item is added to the selection

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.

isidorn commented 4 years ago

@leonardder I got what you mean. For that I have created a new feature request https://github.com/microsoft/vscode/issues/92564 Let's continue the discussion there. Thanks!

bkoray commented 4 years ago

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 dev not selected collapsed level 2 etc not selected expanded level 2 level 3 alternatives not selected collapsed

Version: 1.44.1587431043-insiders (user setup) Commit: c359b95aa96eb0ec5a5e6cee2c3f4a4978e24963 Date: 2020-04-21T01:44:28.769Z Electron: 7.1.11 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.18362

isidorn commented 4 years ago

@bkoray hello! This is up to the NVDA screen reader. Can you please file an issue against them? The only way to fix this on the VS Code side is to "lie" and say that focused elements are also selected, which is incorrect.

LeonarddeR commented 4 years ago

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

  1. Open the file explorer
  2. Focus a not selected item
  3. Press shift+down arrow. Observe that that particular entry is selected.
  4. Press up arrow. NVDA says not selected for the first entry. I assume this is expected, as pressing arrows without shift normally undoes selection
  5. Press down arrow. Observe that the just selected item still seems selected. I would not expect so.

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.

isidorn commented 4 years ago

@leonardder correct it behaves just like that. Even though this behavior might look strange this is how we VS Code lists and trees behave from day 1. @joaomoreno can exaplain deeper on the exact reason why and if there are open issues where users complain about this. Aslo do we have this documented somehwere? I think not.

LeonarddeR commented 4 years ago

Well, in that case I understand the strong desire to know how many items are selected and possibly even which items are.

isidorn commented 3 years ago

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. Thus closing