fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
4.91k stars 284 forks source link

🗣️ Screen reader support for reactive output changes #2757

Closed fonsp closed 6 months ago

fonsp commented 7 months ago

This PR makes a step to get Pluto closer to being usable keyboard-only with a screen reader.

When you edit and run code, it will start running, and when finished, the result is returned by updating the cell's output. Because this is asynchronous, this information is currently not surfaced with a screen reader. The solution is to use an "ARIA live region": you can declare a DOM element to be "live", meaning that any update that happens to it should be announced with speech.

This PR makes the <pluto-output> a live area.

Here is a screen recording (no audio but subtitles). Notice that the third cell runs reactively, and the new result gets announced.

https://github.com/fonsp/Pluto.jl/assets/6933510/e8c988d6-5190-48aa-ba1c-fa71855f591b

Recorded on Chrome with MacOS voice-over enabled (default settings, dutch).

TODO:

github-actions[bot] commented 7 months ago

Try this Pull Request!

Open Julia and type:

  julia> import Pkg
  julia> Pkg.activate(temp=true)
  julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="screen-reader-reactive-outputs")
  julia> using Pluto
fonsp commented 6 months ago

Let's work on these TODOs in the future :)