gnab / remark

A simple, in-browser, markdown-driven slideshow tool.
http://remarkjs.com
MIT License
12.67k stars 854 forks source link

Add aria-live-tag to slides #654

Open LangdalP opened 3 years ago

LangdalP commented 3 years ago

I was testing how well a screen reader would work with remark.js slides. In general, it works quite well, but the screen reader does not catch that the content of a slide changes when the user clicks the left or right arrows. I have fixed this by adding an ARIA live region. This gives a hint to screen readers that it should listen for changes inside the region, and read these aloud.

I have tested this change with Mac OSX's VoiceOver utility. The change works as intended. However, I am not sure if it is possible to write any sensible automated tests for this, so I have not added any tests.

Note that after modifying src/remark.html and running make.js, I observed that two other files had changed. I assume these two files should also be a part of the check-in, since they are not gitignored. Please let me know if that is wrong.