You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Integrated terminal does not support screen readers #8339
accessibilityKeyboard, mouse, ARIA, vision, screen readers (non-specific) issuesfeature-requestRequest for new features or functionalityon-testplanterminalGeneral terminal issues that don't fall under another labelupstreamIssue identified as 'upstream' component related (exists outside of VS Code)
Daniel Imms (@Tyriar) oh, missed your last few comments. Suggest leaving the keystroke unbound by default, since a screen reader user will choose something other than ctrl+a. Think an explicit select all, copy and paste should suffice, unless there are others that will find a copy to empty editor useful as well.
No, tabindex="-1". 0 would result in every line being in the tab order, which is not what you want. -1 still allows programmatic focus but without putting the element in the tab order.
One problem I was seeing when doing this was "focus" was maintained separately in screen readers and standard focus when navigating about a page and therefore not getting events. I guess that might have been because I wasn't using tabindex=-1?
Rather than supporting navigation with your own keyboard shortcuts
Would home/end/page up/page down still need custom shortcuts? I use page up to scroll a lot when using the terminal personally.
It won't work for JAWS
I believe JAWS has issues with Chromium so that's not a target currently.
Daniel Imms (@Tyriar) since selection wouldn't work using this approach, I was wondering if the use case of selecting previous output was selected for sighted users. If the integrated terminal only allows selecting the current viewport regardless, then this shouldn't be a problem.
So the select all command in the command palette with reliably select everything in the terminal as we maintain our own selection model, this was added 6-12 months ago so sighed users can select more than what's in the viewport via keyboard/mouse. As for selecting a subset for screen reader users, we may be adding keyboard selection/selecting to the last command in the future.
@jcsteh wow, didn't know that NVDA still focuses stuff with tabindex = -1.
Actually, NVDA can't tell the difference between something with a tabindex >= 0 and -1. All it knows is that it is focusable.
One problem I was seeing when doing this was "focus" was maintained separately in screen readers and standard focus when navigating about a page and therefore not getting events. I guess that might have been because I wasn't using tabindex=-1?
Unless the element is focusable by default (e.g. button, a href, input, etc.), if you're not using a tabindex (-1 or otherwise), it is not focusable as far as the DOM is concerned. Accessibility doesn't get any special treatment here; if it isn't focusable, an accessibility client can't "focus" it either.
Would home/end/page up/page down still need custom shortcuts? I use page up to scroll a lot when using the terminal personally.
The problem is that NVDA browse mode will override these to navigate within browse mode. That is indeed another problem with this approach, perhaps a showstopper.
It won't work for JAWS
I believe JAWS has issues with Chromium so that's not a target currently.
JAWS does work with Chrome IIRC, but I'm not sure how well it works with embedded Chromium.
James Teh (@jcsteh) I have a prototype and it's working very well. The only issue I see is that holding down up will skip over the remaining lines. I tried to add a bigger buffer at the top but NVDA just gets confused and continues to focus items above. I think it should be fine to accept that. It also feels more "solid" in general and supports reading through each char in a line etc.
On page up/page down/etc. there are other commands that deal with that already, for example shift page up and shift page down scroll up and down a page. I'm thinking I'll just make them aware of the focus inside the terminal and handle it correctly (no need to maintain two different keybindings).
Note that users can choose to pass the key through if they wish. If you manage the focus correctly, the screen reader will track it as expected. If you're really concerned about it, you could choose a key binding that isn't occupied by browse mode. For example, although shift+pageUp is taken by the smreen reader to select to the top of the page, alt+pageUp isn't occupied by the screen reader.
James Teh (@jcsteh) I thought that would be a possibility, I tried with cmd+page up but it didn't work. Do you know how to do this using NVDA or VoiceOver so I can test it out?
accessibilityKeyboard, mouse, ARIA, vision, screen readers (non-specific) issuesfeature-requestRequest for new features or functionalityon-testplanterminalGeneral terminal issues that don't fall under another labelupstreamIssue identified as 'upstream' component related (exists outside of VS Code)
Activity
Tyriar commentedon Jul 6, 2017
Upstream issue: xtermjs/xterm.js#731
Tyriar commentedon Jul 6, 2017
Targets:
27 remaining items
Neurrone commentedon Jan 24, 2018
Daniel Imms (@Tyriar) oh, missed your last few comments. Suggest leaving the keystroke unbound by default, since a screen reader user will choose something other than ctrl+a. Think an explicit select all, copy and paste should suffice, unless there are others that will find a copy to empty editor useful as well.
jcsteh commentedon Jan 24, 2018
Neurrone commentedon Jan 24, 2018
James Teh (@jcsteh) wow, didn't know that NVDA still focuses stuff with
tabindex = -1.Tyriar commentedon Jan 24, 2018
James Teh (@jcsteh) great ideas!
One problem I was seeing when doing this was "focus" was maintained separately in screen readers and standard focus when navigating about a page and therefore not getting events. I guess that might have been because I wasn't using tabindex=-1?
Would home/end/page up/page down still need custom shortcuts? I use page up to scroll a lot when using the terminal personally.
I believe JAWS has issues with Chromium so that's not a target currently.
So the select all command in the command palette with reliably select everything in the terminal as we maintain our own selection model, this was added 6-12 months ago so sighed users can select more than what's in the viewport via keyboard/mouse. As for selecting a subset for screen reader users, we may be adding keyboard selection/selecting to the last command in the future.
jcsteh commentedon Jan 24, 2018
@Neurrone commented on Jan 24, 2018, 11:50 PM GMT+10:
Actually, NVDA can't tell the difference between something with a tabindex >= 0 and -1. All it knows is that it is focusable.
Unless the element is focusable by default (e.g. button, a href, input, etc.), if you're not using a tabindex (-1 or otherwise), it is not focusable as far as the DOM is concerned. Accessibility doesn't get any special treatment here; if it isn't focusable, an accessibility client can't "focus" it either.
The problem is that NVDA browse mode will override these to navigate within browse mode. That is indeed another problem with this approach, perhaps a showstopper.
JAWS does work with Chrome IIRC, but I'm not sure how well it works with embedded Chromium.
Tyriar commentedon Jan 25, 2018
James Teh (@jcsteh) I have a prototype and it's working very well. The only issue I see is that holding down up will skip over the remaining lines. I tried to add a bigger buffer at the top but NVDA just gets confused and continues to focus items above. I think it should be fine to accept that. It also feels more "solid" in general and supports reading through each char in a line etc.
On page up/page down/etc. there are other commands that deal with that already, for example shift page up and shift page down scroll up and down a page. I'm thinking I'll just make them aware of the focus inside the terminal and handle it correctly (no need to maintain two different keybindings).
Tyriar commentedon Jan 28, 2018
The next Insiders on Monday will have the new mode.
This didn't work unfortunately as the screen reader takes full control of the keyboard in this mode.
Neurrone commentedon Jan 28, 2018
Daniel Imms (@Tyriar) thanks. About the keyboard override, it shouldn't be too problematic since there's a select all feature.
jcsteh commentedon Jan 28, 2018
Tyriar commentedon Jan 28, 2018
James Teh (@jcsteh) I thought that would be a possibility, I tried with cmd+page up but it didn't work. Do you know how to do this using NVDA or VoiceOver so I can test it out?
Tyriar commentedon Jan 28, 2018
I'm going to close this off as the feature is done. James Teh (@jcsteh) we can continue the discussion about keys in browse mode in xtermjs/xterm.js#1257
Remove note about lack of support in terminal