-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Feature Request: improve accessibility of Monaco #16060
Comments
@mltony is this issue also occuring when you use UIA form Chromium browsers explicitely? You can enable and test that in NVDA advanced settings. |
cc @seanbudd |
An expandable code textInfo API might be useful for other editors as well, for example we could expose on this API more information about parenthesis levels for example, so the screen reader could alter the pitch or play a beep wyhen the user enters on a parenthesis or square bracket character, it could have sounds when speaking keywords if the API could expose this information. And if it could be used from other languages it could also be implemented by other IDEs as well, for example IntelliJ. I think most features like sound on warnings or errors could be implemented on top of this API, and VSCode wouldn't need to implement it anymore. |
Another idea, maybe this new API could be implemented as an addon, and when opening |
@Adriani90, I did a quick test and yes, lagging in text areas is also occurring with UIA, actually it's even worse with UIA than IA2. |
@thgcode, the problem with add-on approach is that I would need to convince Monaco devs to allow me to implement JSAccessible and convince Electron maintainers to include Javascript accessibility bridge so that it can be picked up by VSCode. It would be much easier to do so if NVAccess is aligned, so that I can reach out to Monaco and Electron as NVDA dev. But yeah, if not for that, I would've just implemented an add-on prototype first. |
Also I just found out that by default Monaco only shows 10 lines to screenreader, not 500 as I thought before. I updated issue description with that. This can be easily tested on Monaco playground. So yeah, Monaco accessibility is even more broken that I initially thought. |
I'm curious to know what @isidorn has to say about this. There were several attempts to replace the hidden text area in Monaco with something else I believe. |
@hediet should have some updates about the thinking here. |
We are investigating whether to adopt
We are up to improve that, but the text area gets quite slow quickly, so maybe we can increase that with some We should make sure that the improvements for the monaco editor also improve VS Code. |
@hediet, thanks for chiming in. I am trying to understand how would edit context improve accessibility.
If you replace text area, how screenreaders will be able to see and edit text? From this page I see:
Is this the intended way: If so, then NVDA by default won't see source code as editable, only as read only HTML and there will probably be some work required to make it to work on NVDA side to make it to work as editable. Also won't this cause performance concerns with large files, e.g. 10k+ or 100k lines?
Absolutely agree with that. When I created this issue I really meant improving Monaco including the one in VSCode. |
FWIW I built a solution that improves accessibility of VSCode. Specifically it provides access to the entire file in VSCode - not only to 500 lines.
I would be happy to contribute this solution to NVDA core if NVAccess is positive. |
Hi @mltony Sorry, I haven't looked at it yet. Is the VS Code extension you developed effective for the WEB version of VSCode? In other words, can it be installed in vscode.dev? Thanks |
@cary-rowen, most likely that won't work in web VSCode. Most likely it won't be able to create a named pipe from inside sandbox. |
The extension can be found in vscode.dev, but no install button appears. |
@mltony have you continued to work on this proposal? Or should it be closed? |
Let's close this for now. I still think this would be a good direction for NVDA, but I don't expect to have enough time to work on this in the nearby future. |
Is your feature request related to a problem? Please describe.
Accessibility of Monaco editor is limited despite Microsoft effort. For screenreaders it creates an invisible text area, that is only filled with 10 lines of code. As a result the following functions of NVDA don't work correctly in Monaco:
• SayAll doesn't work
• Indentation navigation in source code (via IndentNav add-on) doesn't work.
• Paragraph navigation with multi line break style (as introduced in Improve Paragraph Navigation - add single and multi line break style #13798) doesn't work correctly in VSCode. Despite the author claiming to have tested it with VSCode, around line 500 it won't work correctly since it is using textInfo API, which would only see the first 500 lines of the file.
• Sentence navigation (via SentenceNav add-on) doesn't work.
• Quick search function (via Tony's enhancements add-on) doesn't work.
• In general, one can come up with many other ideas of new functions that can be implemented via TextInfo API. None of them would work correctly beyond 500 lines of code in VSCode or other Monaco-based web applications.
Describe the solution you'd like
NVDAObject
to talk to Monaco editor via JSAccessible when available - otherwise fall back to IAccessible2.Please let me know if you want me to split this into three separate feature requests. However these three are integral parts of a single feature and they are going to be useless when considered separately, so I prefer to keep them together.
To further illustrate this proposed accessibility API, for plain text editors we can think of something like this:
Once Monaco implements JSAccessible API, then I will build a new implementation of
NVDAObject
that can communicate with target Monaco editor via JavaScript Accessibility Bridge and JSAccessible.Describe alternatives you've considered
The previous Chromium issue that was related to Text Area performance was indeed closed about 5 years ago; before that issue was resolved, performance of Chromium was even worse, so that Monaco could only show 10 lines to the screenreader without regressing performance for sighted users. However the fact that it took so long to resolve this issue and the fact that it only improved performance to a limited extent suggests that fixing performance properly (so that Monaco can show the entire text file, say up to 100k lines) is not feasible for Chromium maintainers, and much less feasible for outsiders like me.
Additional context
Previous discussion and big picture thoughts: #15995
The text was updated successfully, but these errors were encountered: