Menu

1 / 2

A canvas is a blank image to a screen reader until you give it HTML

DEV Community: html·Leo·3 days ago
#LBJrnsri
#devto2#devto#dev#screen#canvas
Long article (1010 words) — no AI summary yet.
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.