-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Accessibility: NVDA reading wrong or duplicate content in editor #26730
Comments
I can reproduce this on the latest stable as well with NVDA. |
I have heard from several NVDA users getting hit by this, some going as far as saying this bug renders the IDE impossible to use effectively |
@zersiax yes, its impossible to use, notepad would be better because of this bug. Its like having the screen not displaying lines as they properly appear in the file. |
The editor text accessibility is implemented by using a textarea (the same one we use for input events), where we mirror the buffer text and the selection. Until last month (when we updated to a newer Electron version), it was not possible for us to discern if a screen reader is attached or not, so at this point we always do the following:
I will investigate to adopt the new available Electron API to detect when a screen reader is attached and attempt to remove these two possible causes. |
@alexandrudima thanks. Probably a stupid question, but aren't there standard html controls that can be used for multi-line edits? |
@Neurrone The standard html control that is used for multi-line text is a |
I can confirm and reproduce the problem even in a file with 10 lines (i.e. the "paging" does not appear to be the root cause):
I'll try next a change where we call |
Unfortunately, calling |
Also, this is something I can reproduce on Chrome v58 (via the standalone editor running from master and via the standalone editor from January at https://microsoft.github.io/monaco-editor/) |
@jcsteh any ideas? |
Ok. I have spent around 3hrs reading through Chromium source code, looking at every setter or method on the
One of those events appeared to contain the status bar text for "Ln 1, Col 1", etc. I think Chrome sends out events for every DOM change we do. I have made some local changes to VS Code such that:
This makes it that Chromium sends precisely one event that shows up in It is my belief that NVDA gets confused by all the events Chromium generates as we update various parts of the DOM on cursor move. |
Even having developer tools opened in Chrome where console log messages go (which presumably also sends some accessibility events) seems to cause the NVDA issue to reproduce. |
IMHO something is fundamentally broken in Chromium or in NVDA. Even when I change all our code on the key handling path in such a way that the only Accessibility Event coming out of Chromium matches the one Chromium sends from a native textarea, sometimes (although a lot less often, possibly every 30-40 lines) NVDA still skips a line or reads the same line twice. I believe this is timing related, as the same line, under the same conditions sometimes gets read twice, sometimes gets skipped, and sometimes gets read correctly. I can also trigger the same behaviour in a native Chrome textarea, when I place a large ammount of text inside it (and by large I actually mean a small ammount e.g. 59 KB). Chromium freezes noticeably when moving the cursor in such a textarea, while NVDA happily reads the same character or the same line until at one point they seem to catch up with one another. |
I will look into using an |
Unfortunately, using an
I can reproduce in Google Docs with Braille enabled and in a standalone HTML that has a On our side, we can look into supporting two accessibility modes (like Google Docs does -- one where Braille is enabled and one where we use alerts for screen readers). My iframe MVP changes are saved on https://github.com/alexandrudima/vscode/tree/iframe-io |
Upstream issue: https://bugs.chromium.org/p/chromium/issues/detail?id=725051 |
@alexandrudima Good work so far. I saw you committed the changes you made with the textarea approach which should at least minimize this behavior, is that a solution we can roll with for now until the possible Chromium or NVDA issues that might be contributing to this get fixed? |
@alexandrudima does having braille mode turned off make a difference? Thanks for investigating :) |
Also this might possibly have a similar root cause, but when you arrow through the file explorer you pretty consistently get the file you departed from followed by the file you arrive at. So, say you have a file readme.md followed by structure.md, when you arrow down from readme.me to get to structure.md, the following is read: "readme.md, structure.md, file explorer level 2". Sounds like we've getting too many accessibility events being fired there as well. This is markedly less annoying but does hamper productivity if you use the file browser a lot. I tend to use fuzzy search more myself but figured I'd report. |
Adding @bpasero for the explorer. |
I've installed the add-on and the global plugin that bumps the wait time up to 200ms. A possibly related problem: if a long line of text is wrapped across multiple lines, NVDA incorrectly reads the entire line when arrowing through. For example, this section is right at the top of the default settings.json file
NVDA reads the entire 3-line block when arrowing through each line. Also when in the editor for files in readonly mode, pressing up arrow when on the first line unexpectedly moves you outside the editor. Down arrows will also sometimes move you outside the editor as well. |
I pushed a change for trees in VS Code to no longer produce duplicate events. Turns out we were changing the Interestingly the list widget never had this bug and in there we are not updating @joaomoreno fyi I think in the SCM world we however lost the ability to read back additional meta information to screen readers when navigating through outgoing changes. I think we used to announce the type of change for each item in the tree. |
These are well known chrome bugs.
…On Wed, May 24, 2017 at 8:36 PM, Dickson Tan ***@***.***> wrote:
I've installed the add-on and the global plugin that bumps the wait time
up to 200ms.
A possibly related problem: if a long line of text is wrapped across
multiple lines, NVDA incorrectly reads the entire line when arrowing
through. For example, this section is right at the top of the default
settings.json file
// Controls auto save of dirty files. Accepted values: 'off', 'afterDelay', 'onFocusChange' (editor loses focus), 'onWindowChange' (window loses focus). If set to 'afterDelay', you can configure the delay in 'files.autoSaveDelay'.
NVDA reads the entire 3-line block when arrowing through each line.
Also when in the editor for files in readonly mode, pressing up arrow when
on the first line unexpectedly moves you outside the editor. Down arrows
will also sometimes move you outside the editor as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26730 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFGivZx7xu6weuU8z4pKwsf5B3Die3bcks5r9OkTgaJpZM4NcLUm>
.
--
Derek Riemer: Improving the world one byte at a time!
- University of Colorado Boulder Department of computer science, 4th
year undergraduate student.
- Accessibility enthusiast.
- Proud user of the NVDA screen reader.
- Open source enthusiast.
- Skier.
Personal website <http://derekriemer.com>
|
That's terrible and quite surprising, since its been around for several years now. Guess I'll be sticking to Firefox for the foreseeable future, and will have to wait for upstream fixes. |
@Neurrone commented on May 25, 2017, 12:35 PM GMT+10:
@derekriemer commented on May 25, 2017, 11:35 PM GMT+10:
On the contrary, I can't reproduce either of these issues in Chrome using the long line that @Neurrone provided, either with a textarea or a contentEditable div. |
@jcsteh perhaps the version of VS code I'm using (latest stable) uses an older version of chrome? |
Since this is becoming an uber-issue, let me try to sum up and split it into other issues where necessary: Issue from @zersiax : Navigating with cursor keys in the editor results in NVDA reading the same character or the same line twiceChanges on our side: we have done a full review of all the stuff (stepping through the ~25 listeners) that executes in the cursor movement case and have reduced the time spent in our code to ~1-2ms. As part of this 2ms we also immediately move the cursor in the Solution: The plugin provided by @derekriemer that increases NVDA's timeout to 200ms seems to completely resolve the issue. Furthermore, thanks to @jcsteh there is an open PR in NVDA where the default timeout is increased from 30ms to 100ms. Issue from @zersiax : Navigating with the cursor keys in the explorer tree results in too many accessibility events and too many items are readSolution: @bpasero has pushed a fix where the aria labels on tree elements are no longer modified in the selection change case. Issues from @Neurrone :Arrow down in word wrapped editor ends reading the entire line possibly multiple times: extracted to #27766 - I can reproduce Up/Down arrow in a read only editor sometimes moves you outside the editor #27765 - I still need to reproduce and confirm. I think those 4 issues sum up this thread, since we continue the issues from @Neurrone in two separate threads, I propose to close this one and celebrate our progress. ❤️ @derekriemer One last ask: Would it be possible for you to host the plugin that increases the timeout to 200ms on GitHub or something similar. I would like to document that we recommend folks install this plugin when working with NVDA and VS Code and I would like to link to it from our website and from our release notes. I wouldn't want this to end up causing too much traffic costs or something... Thank you ! |
Sure, Where should I contact you guys when I do? I don't mind it being
hosted by my site, I have the bandwidth and can handle it, but github isn't
my server admin, and is more likely to suffer no downtime. I'll post it
later this week.
…On Wed, May 31, 2017 at 11:59 AM, Alexandru Dima ***@***.***> wrote:
Closed #26730 <#26730>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26730 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFGivUm2ziooG8T2Zx333MyambcaD_jIks5r_aqCgaJpZM4NcLUm>
.
--
Derek Riemer: Improving the world one byte at a time!
- University of Colorado Boulder Department of computer science, 4th
year undergraduate student.
- Accessibility enthusiast.
- Proud user of the NVDA screen reader.
- Open source enthusiast.
- Skier.
Personal website <http://derekriemer.com>
|
@derekriemer That would be great! Another comment here would work great ❤️. |
Using the latest insider build and the add-on, am experiencing inaccurate reporting of the current word when moving by word using ctrl+right/left arrow. Still see this issue as well with up/down arrows, also by character. Are the changes made on VS Code's end not included in the insiders build yet? |
@Neurrone The latest insiders contains all the relevant changes. Let's start a new thread/issue with your detailed setup. Could you please include:
|
I've restarted NVDA with all add-ons disabled and am still encountering this. I'm experimenting with the read-only settings file and the user settings file. Am just pressing the left/right arrow keys (arrows, ctrl + left/right arrow to move by word, etc). Notice this especially when you go right/left, then change direction. Not sure what alt+f1 says, since i can't find the message with NVDA. |
Switch to browse mode (nvda+space) to read the message after pressing
alt+f1. I think that message might need an ARIA live region to be read
automatically.
|
Hi: Sorry, I never published the plugin. As of the last NVDA version (2017.3), it now has a cursor timeout of 100 MS. |
Steps to Reproduce:
Observed Behavior:
Rather than speaking the focused line, NVDA will at times read the line or even several lines above it.
Interestingly, braille output appears to work well enough.
Expected Behavior:
NVDA should speak the correct line when navigating through code, for a lot of people using screen readers do not use braille displays to compensate.
Suspected cause:
The fact that braille works well and speech does not leads me to believe it takes too long for the focused line to be visible for NVDA. I don't know enough about the VS Code internals to comment further.
The text was updated successfully, but these errors were encountered: