A four-year-old taps a letter on a tablet and hears a cheerful sound. Another four-year-old, using a screen reader, gets silence. Rhiana Heppenstall puts it plainly: canvas elements "are not accessible to keyboards and screen readers. They are treated as blank images."
Heppenstall, an accessibility lead at 3P Learning, wrote up how her team fixed that for the Readingeggs reading activities on day 2 of the HTMHell Advent Calendar. The activities moved from Flash to canvas when Flash declined, especially for iOS apps, in 2010. Rewriting thousands of them wasn't realistic, and an alt-text-style description couldn't cover activities this detailed. Fallback HTML was the lower-risk option, and it could ship incrementally without interrupting anyone's learning.
A second interface behind the drawing
The <canvas> element is designed to carry fallback HTML for when it doesn't load. Heppenstall's team turned that fallback into a real interface: headings, text and buttons a screen reader can read out.…