Replies: 19 comments 1 reply
-
Many thanks for the interesting read @mltony ! While I certainly agree that issues you've described are severe and they should be solved by us, I am not certain the proposed solution goes in the right direction. Starting with the web based coding editors I see two non exclusive solutions which seems more promising:
Why I believe implementing fixes in the web browsers is nicer:
As to the Google Docs issues most of these are solved in JAWS, which shows that no additional API's are needed. Note that their way of implementing quick nav is a bit strange, we could certainly do it better, but it requires just switching to the quick nav mode and then familiar single keys work. This is possible in JAWS since they have an ability to implement scripts for specific web apps, something which NVDA lacks and implementing it probably would be useful for myriad of other use cases. I've skimmed scripts for Docs, they mostly rely on IA2, using a custom solution for accessing HTML directly (we probably could do the same with |
Beta Was this translation helpful? Give feedback.
-
@lukaszgo1,
My assessment is that it's not realistic. A couple of years ago VS Code increased their frame size from 10 to 500 because Chromium addressed some issue related to performance of large text areas. My intuition tells me that if they didn't go all the way, there must have been some difficult technical issue that they weren't able to solve, and probably I won't be able either. I expect even if I plunbge in learning chromium internals, I might spend like a couple of months and in the end not produce a satisfactory solution to be merged. While with JavaScript accessibility bridge I see a clear path to a working prototype. And the only thing that's really uncertain is collaboration with Google - which I am fine to drop if Google chooses to not collaborate.
I am not very familiar with contentEditable. But I don't see how would this help? The problem that Monaco and CodeMirror are facing is that Chrome can't handle large text inside text areas. In my understanding contentEditableis just an attribute, so I don't understand how setting this attribute would help textArea performance - it seems to be orthogonal. Or am I misunderstanding this?
I agree. It appears to be a convenient status quo for sighted people. If Monaco only provides 500 lines - they can still claim things are accessible. Same is true of Chrome, text areas are kind of accessible. Incremental improvement is hard and the gain is marginal in the eyes of sighted people. Who cares if Monaco displays 500 or 1000 lines via IAccessible2. And that's the reason why I was trying to find a way to disrupt this status quo.
I agree it would be a more elegant solution. However realistically I don't think I ccan make a difference by tinkering with chromium because I anticipate it'd be quite difficult from technical point of view. But I can see I can produce a working prototype of JavaScript accessibility bridge in 1-2 months.
Cursory investigation shows that Selenium WebDriver is already available for Electron. On the other hand, if we choose the extension way, I believe we can reach out to electron developers and convince them to include the extension into their next version. In practice most people are sympathetic to the cause of accessibility, as long as no effort is required on their side. |
Beta Was this translation helpful? Give feedback.
-
The part of this discussion relating to electron apps and needing to include an addon or something for an access bridge put me in mind of the Java Access Bridge. My experience in the (java world is that in apps where the developer ships there app with a bundled Java runtime, they do not always include the (java Access Bridge. In these cases for those with the know how it is possible to insert the (java Access Bridge into the bundled Java runtime, but this is probably beyond the knowledge of the average user and so such app is not accessible to many. This may be made worse by the jpackage tool included in the JDK not including the access bridge by default for a modular (java app, it would always need specifying. So for electron I could foresee a similar mess of not accessible apps occuring, particularly if the addon needed the developer to always select something to be included. Also with electron I don't know whether even with the right technical knowledge whether it would even be possible to insert such an addon after should a developer leave it out. |
Beta Was this translation helpful? Give feedback.
-
Pressing Insert + 0 when in Google Docs should be sufficient. If not scripts are located in
I always thought that simply no one cared enough, but this is not something which can be proved in any way.
I won't be so sure that developers of Monaco, CodeMirror and ACE (to name only a few of web based editors() will implement whatever is needed to work with the JS Accessibility.
I'm not a web expert, but my understanding is that, since the content of the edited file is already in the DOM, using
It looks like I misunderstood something here: to what extend each of the web based editors would have to be changed to implement the JSA bridge in your opinion? |
Beta Was this translation helpful? Give feedback.
-
@lukaszgo1,
Perhaps I didn't make it clear in my proposal - I will implement accessibility for Monaco and CodeMirror myself. And talk to electron to convince them to include the extension by default.
No, contents of edited file are not in DOM, they are in a JavaScript variable. They only put 500 lines to the DOM due to performance considerations. That's the reason why I thought JavaScript Accessibilty bridge would come in handy, since implementing that API for Monaco or CodeMirror would be a bunch of one-liners.
They would have to implement a bunch of simple functions. E.g. |
Beta Was this translation helpful? Give feedback.
-
@mwhapples
So TL;DR no configuration will be required in my envisioned prototype. |
Beta Was this translation helpful? Give feedback.
-
@lukaszgo1, |
Beta Was this translation helpful? Give feedback.
-
@mltony Perhaps you would be interested in the WeBaccess add-on? See https://github.com/accessolutions/WebAccessForNVDA |
Beta Was this translation helpful? Give feedback.
-
@AAClause, But also on the other hand this add-on seems to have little to do with this feature request as what I propose cannot be accomplished via bookmarks or markers. |
Beta Was this translation helpful? Give feedback.
-
The documentation is here, But it currently does not cover all the features of the add-on. For instance, it's possible to add Python code to a web module (JSON file). This enables the addition of specific actions, enhancement of certain interactions, and so on.
It's planned! :) We need to finish certain tasks first. |
Beta Was this translation helpful? Give feedback.
-
@lukaszgo1,
But the fact is this level of accessibility is not enough and this new add-on is just a quick hack and it doesn't solve the problem fundamentally, so this feature request still remains unchanged. |
Beta Was this translation helpful? Give feedback.
-
@mltony would it actually be possible to point Google to put their editing area of a document in a modal dialog? Then we could use the focus and browse mode of NVDA within the modal dialog without having to translate key strokes into NVDA virtual document. Not sure though if scrolling the screen only within the dialog is possible. What do you think? |
Beta Was this translation helpful? Give feedback.
-
@Adriani90, not sure I fully understand your idea. You propose to show document content in a modal dialog. Is that going to be editable content or just non-editable text? If the first - then how is that different from current implementation - I think it will also suffer from all current problems. If the second one - then how are users supposed to edit text? |
Beta Was this translation helpful? Give feedback.
-
Actually the second one. My idea was that there could be a button or a keystroke which shows the document in a non editable mode (let's call it preview mode) meaning it is displayed in a modal dialog. Then you could close the dialog landing again in the editable area. |
Beta Was this translation helpful? Give feedback.
-
Hi @mltony and everyone else who’s contributed to the discussion so far. Thanks for bringing the proposal of a JavaScript accessibility bridge to our attention and the robust discussion around it. I wanted to share NV Access’s perspective:
Your expertise, advocacy, and feedback are vital as we navigate these discussions and collaborations, and we are committed to working toward solutions that enhance web accessibility. We will continue to monitor this initiative's progress closely and engage at the appropriate juncture, with a keen interest in developments that align with our mission to ensure that the web is accessible to all. I suggest that to gain the necessary traction, this proposal would need to go through the following (partially overlapping) steps:
In conclusion, while we see the value in the proposed JavaScript accessibility bridge, our immediate focus is on advocating for built-in accessibility and engaging with initiatives that promise to be broadly supported and effectively implemented. We look forward to contributing to this dialogue and continuing to explore how such innovations can benefit NVDA users. |
Beta Was this translation helpful? Give feedback.
-
Hi @gerald-hartig, thanks for your reply. So it seems like that's a polite no from you.
That's not likely to happen. Most people are quite content with having 10 lines of code at a time. It's the minority of power users who would appreciate new feature. Anyway, LMK if you ever change your mind. |
Beta Was this translation helpful? Give feedback.
-
I'm glad to see @mltony proposing this. If @mltony had a prototype, I'm sure I could advocate for it on Google Docs and chromium. I'd love to see NV Access support this along the way. |
Beta Was this translation helpful? Give feedback.
-
Hi @cary-rowen, we're happy to support it, but we feel that the point where we can really make a difference is at the end of a long line of other dependencies. We also don't want to discourage @mltony from working on this. It's just that right now, we feel that the return on investment would not justify NV Access investing significant effort into it when we have so many other things on the roadmap. Everything that we choose to support means that something else is delayed. As you suggested, if @mltony gets a prototype up and running, and you get some traction with google docs and chromium, then that's another matter. And this is similar to what I was suggesting in my (rather overlong) message above. Possibly all of those pre-requisites above won't be required, but I included them to illustrate that this may require more than an excellent technical solution. |
Beta Was this translation helpful? Give feedback.
-
@cary-rowen, @gerald-hartig, |
Beta Was this translation helpful? Give feedback.
-
This is a proposal for future direction NVDA project can take, rather than a concrete feature request. I would like to see if there is an alignment with NVDA devs on whether this is a reasonable direction. I apologize for creating another huge issue - it'll probably take ~10 minutes to read it; however since I am proposing a brand new direction, I had to lay out extraordinary justifications in order to convince people that this is right direction. There are many headings below for ease of navigation.
TL;DR
The world is rapidly moving towards web technologies and away from natively executed computer programs - think of Google Docs or VSCode - just to name a few examples. Current state of accessibility of many web applications is unsatisfactory (examples below) and the reason is that communication between screenreader and web applications happens through accessibility APIs (mostly IAccessible2) that either don't account for needs of modern web apps (Google Docs) or are poorly implemented (e.g. large text in edit boxes in Google Chrome is too slow).
I propose to start working on a fundamental solution to this problem: build a JavaScript accessibility bridge to allow screenreaders to communicate directly with JavaScript environment of web apps running inside browser instead of relying on IAccessible2 with all its flaws.
Below I list some concrete problems of status quo and propose a fundamental solution.
Problems with accessibility of web applications
Google Docs
The main problem with Google Docs is that they effectively implemented their own screenreader running inside the browser. While this is understandable (what else could Google devs have done at the time to make it accessible to screenreader users), and I feel gratitude to Google devs for making Google Docs accessible; this is not a good solution in the long run.
Here are some reasons why implementing your own screenreader in every web-based office solution is a problem for screenreader users:
RightArrow
Google Docs speaks the previous symbol, instead of current one; Same applies toControl+RightArrow
. This is inconvenient for NVDA users (and probably Jaws users as well). It is wrong that NVDA and Jaws users have to relearn basic character and word navigation commands in order to be able to work with Google Docs. This is mitigated by turning on Braille mode though.Control+Alt+N Control+Alt+H
. Jump to next table is even worse:Control+Alt+Shift+N Control+Alt+Shift+T
. On one hand it is understandable, since for web apps the selection of keystrokes is limited, but on the other hand the end result is still bad. Not to mention that in practice these shortcuts are often unreliable.VSCode and Monaco editor
VSCode is an electron based application running from within chromium-like browser, and this means that all the communication between screenreader and its UI elements happens through IAccessible2 with all its limitations.
Monaco is a browser based code editor with rich set of features written in TypeScript. While claiming to be accessible, it has one big accessibility flaw: it only provides 500 or so lines of your source code file through accessibility API at a time. More details can be found in microsoft/vscode#41423, which is blocked on this and that chromium issues.
So if NVDA tries to retrieve some lines in current editable via TextInfo API, it would only see 500 lines, no more - VSCode effectively truncates the document. Why having access to only 500 lines of code is not enough?
CodeMirror editor
CodeMirror is another popular open-source online code editor and is a direct competitor to Monaco. It is being used most notably in Chrome and Firefox Developer Tools, Coderpad online editor (frequently used by major IT companies for online interviews) and GitHub's in-browser edit feature (full list can be found on CodeMirror real world uses page.
The previous version CodeMirror 5 was not accessible by screenreaders as it only presented an empty text area - this was tracked in codemirror/codemirror5#4604 - notably CodeMirror maintainers are stating that adding accessibility support will require a major redesign and even proposing to raise funds for this.
It appears however that recently some accessibility has indeed been implemented in CodeMirror 6, which is current production version. However when I try CodeMirror in the sandbox they only expose 35 lines to the screenreader, which is much less than Monaco. Therefore all the problems of Monaco that I laid out in the previous section apply to CodeMirror 6 as well, but all these problems are even much more severe here, due to much smaller frame size.
Proposed solution
I envision that the fundamental solution to the problems I mentioned above would be a new JavaScript accessibility API that the authors of web apps can easily implement. Let's call it
JSAccessible
for now. Then we'd need to figure out a way for NVDA to talk directly to that API bypassing IAccessible2 - more on that below.To illustrate this proposed accessibility API, for plain text editors we can think of something like this:
If we can have Monaco and CodeMirror implement this API, then we can update NVDA to check whether current TextArea in browser happens to implement this API and if so, transparently switch from
IAccessible2
toJSAccessible
and retrieve text contents viaIJSAccessiblePlainTextEditable::getTextInRange(startIndex, endIndex)
call. This way we'd be able to easily have access to the entire buffer inside Monaco/CodeMirror instead of a frame containing only a a few hundred lines.Similarly, for online office solutions another more complicated interface can be developed that would provide NVDA information about text and its formatting, like font size and bold/italic attributes. The challenge here would be convincing Google to implement this interface for Google Docs, but my hope is if we produce a working prototype that works for plain text editors and this project gains some steam, eventually we'll be able to find a live human inside Google who can implement this JSAccessible interface for Google Docs.
The next big question is how can we make NVDA to talk to that interface? A browser has an isolated JavaScript VM for every page and it's not easy to have a native application to talk to any code living within that VM. I can think of two approaches here:
I am not an expert on JavaScript and web technologies, so I am not sure which way is the best. It would be great if anyone more knowledgeable can chime in on pros or cons of both approaches. But from my cursory investigation it seems at this point that either approach can do the job.
So to summarize proposed design, we will need to punch a hole into JavaScript world inside browser environments by implementing either a browser extension that can talk to NVDA or via Selenium WebDriver; and then we can redesign implementation of NVDAObjects to try querying current text area in the browser via new JSAccessible interface; with a potential fallback to IAccessible2.
Discussion
Here I answer some questions ahead of time, that I anticipate to be asked to address potential skepticism.
Why do I need to align anyone instead of just implementing a prototype myself?
This is a huge project proposal that would require cooperation from many parties, like VSCode team, CodeMirror, Electron, potentially also Google Chrome and Google Docs teams. It would greatly help if NVDA devs are aligned, so that I'd be able to readch out to those parties on behalf of NVDA rather than an unknown independent dev - that would improve chances of PRs being accepted and in case of Google with closed source Google Docs it would increase the chances they'll be willing to collaborate.
Also without alignment, my work can end up being an NVDA add-on instead of NVDA core feature and as it happens with add-ons, many people either hesitate or don't know how to use add-ons, so the impact of this project will be limited.
We should follow W3C/WCAG standards. This proposal is unacceptable because it doesn't conform to the standards.
We are facing the situation when current set of accessibility standards is not doing a satisfactory job - see lists of problems in the previous sections. In case of Monaco and CodeMirror it's actually the problem of Chromium implementation that prompts web application devs to search for workarounds. In case of Google Docs its developers chose to implement a new screenreader on their side because there was no effective way to communicate with a proper native screenreader from inside browser using existing accessibility APIs.
I feel it is up to us, screenreader users and developers: either we are fine to put up with all the drawbacks of status quo - in fact that's one of the reasons why I am submitting this proposal - to see if perhaps most of the people here are not bothered by the problems I outlined above. Or if the problems are bothersome enough, it is up to us to work on a better solution. But in either case we shouldn't be constrained by the set of standards that were developed years ago and that most importantly do not solve accessibility issues that I outlined above.
Why invent a new accessibility API instead of improving IAccessible2/UIA?
Google Chrome, being the most popular browser on the market, has limitations in its implementation of IAccessible2, especially when it comes to large amounts of text in editables. Despite the fact that these issues were reported years ago (links to the issues can be found in Monaco section), not much progress has been done, so it appears that Chrome developers are either not much interested in fixing these issues, or proper fix is going to be technically challenging enough. So working on this direction doesn't appear to be hopeful to address accessibility of Monaco and CodeMirror.
As for Google Docs, I only have a limited knowledge of IAccessible2 and cannot say for sure that it's not enough for Google Docs to expose document structure to screenreader the way Microsoft Word and LibreOffice do that. But I assume they had some good technical reasons to go the hard way and implement their own screenreader. However, if anyone is more familiar with IAccessible2 and accessibility layer of Google Docs, please feel free to chime in and tell us if an upgraded version of IAccessible2 can be used to improve Google Docs accessibility.
Some people argue that having access to only a singole line of a document at a time is enough and screenreaders shouldn't provide more sophisticated functionality.
For some people using only simple functions is enough. Others use more advanced functions. A couple of examples of my own use cases that are blocked by current state of accessibility:
Control+Shift+Alt+N Control+Shift+Alt+T
, then I actually need to release Control, Shift and Alt - otherwise it doesn't work, then pressControl+Shift+Alt+N Control+Shift+Alt+T
again. It doesn't have to be that painful.So for some users simple use cases are enough and they might not understand my frustration with my use cases. But given the fact that working in a large IT companies often requires these sophisticated use cases, I would argue that NVDA should be the tool to help visually impaired people to get meaningful employment. That is NVDA shouldn't ignore basic use cases in favor of sophisticated ones, but focus on both and not neglect sophisticated ones.
Some people argue that advanced logic should be encoded in application-specific scripts rather than NVDA.
There are multiple issues with this approach:
NVDA+Alt+Up/Down
keystrokes to it because it doesn't treat Insert key as a possible modifier. As a result muscle memory never has a chance to develop, which reduces efficiency.Conclusion
I guess with this feature request I would like to hear what NVDA devs and users think about this project proposal.
In conclusion I wanted to say that it's a shame that while modern consumer computers can process gigabytes of data per second, we, screenreader users, only have access to puny 500 or 35 lines of code at a time. It is also too bad that (as CodeMirror maintainer stated in Accessibility for blind and visually impaired screen reader users codemirror/codemirror5#4604) about accessibility on the web:
Beta Was this translation helpful? Give feedback.
All reactions