chrispsn / mesh

Old version. Visualise data and edit JavaScript code using a spreadsheet interface.
http://mesh-spreadsheet.com
Apache License 2.0
1.57k stars 61 forks source link

Accessibility for screen readers #68

Open chrispsn opened 4 years ago

chrispsn commented 4 years ago

I’d love to hear more about what you would find useful on this front.

https://support.office.com/en-us/article/make-your-excel-documents-accessible-to-people-with-disabilities-6cc05fc5-1314-48b5-8eb3-683e49b3e593

mikolysz commented 4 years ago

I can't say much, as I don't really know how this app works in detail, as it's inaccessible. What I do know is that doing this is significantly harder on the web than on Windows, as accessibility APIs for the web are much more limited. In general, what we would need is something similar to what Excel provides. Moving with the arrow keys through cells should announce their coordinates (like a1) and their contents. Editing contents should be accessible too. The most crude and hacky way to implement cell reading is to use an aria live region. Live regions are supposed to be used with dynamic areas which screen readers should read as they change. Examples include subtitles for movies, chat message histories, terminal output areas etc. However, they're often used to make your screen reader output arbitrary text, for the lack of a better web API to do so.They way to implement this would be to create an item somewhere, preferrably at the extreme bottom of the page, make the item invisible to ordinary users (this can be done with css), and mark it as a live region. Announcing messages to a screen reader would be done by replacing the text of that item. This is the approach Google Docs uses, due to the inability of the web APIs to convey some information ina more sane manner. It has certain drawbacks, though. It doesn't work well with braille displays, and it doesn't support outputting one message more than once, with no text inbetween. This is because the new message, in fact, doesn't change the text of the live region, and it is ignored by the screen reader.

There are better approaches to do this with ARIA, Google does this somehow with their Braille Mode in Google Docs, but I have not tested this extensively, and I don't know the technical details. The live region model could be a crude solution that would work for now, something better could be implemented later.