nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.11k stars 637 forks source link

Feature request: build JavaScript accessibility bridge to improve accessibility of web applications #15991

Closed mltony closed 10 months ago

mltony commented 10 months ago

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:

lukaszgo1 commented 10 months ago

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:

  1. All screen reader / magnifier users benefit. While opinions may differ about being accommodating for users of different commercial screen readers for Windows, I hope no one argues against improving access of users on MacOS and Linux.
  2. The accessibility benefits would be inherited by Electron based desktop apps. This point shows the biggest flaw in your idea IMO, namely that we need to communicate with a given process via an add-on. While that works for browsers and, at least in theory, would work for VS Code as it supports add-ons, there will always be additional applications some of them don't even support external components. To use a real life example: RStudio is a desktop application which embeds a web based editor, yet as far as I can tell it has no support for external add-ons. It would be much easier to convince its developers to update the version of editor and Electron (since both of these would have to updated eventually if the product should remain on the market) than star with 'you need to implement an ability for external add-ons'.

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 ISimpleDOM). Given that JAWS works better here, I see very little chances of convincing Google developers to implement a different standard. Note also that if contentEditable would work better, additional SAAS office suites would use it, essentially allowing accessibility to work the same way in most of them. There is of course a matter of limited resources. I'd be a real pita to spent time on the JS Accessibility Bridge, find out that it has not been implemented anywhere or almost anywhere, so working on fixing text area issues in browsers / adding ability to script web apps has to be implemented after all. What I have proposed certainly requires a lot of time and skills, but, if done, guarantees results. The same cannot be said about the JS Accessibility Bridge idea IMHO. If I had your programming skills, and be affected by the issues described in the initial comment to the extend you are, I'd at least try to investigate these avenues.