#5117·axe-core

Full support for HTML in Canvas

Author: WilcoFiersCreated May 25, 2026Updated Sep 29, 2026
Labelsfeatcorestandards

I've been looking at how axe-core stacks up to HTML in canvas, which Google has been pushing. Most things already seem to work reasonably well. There are a few cases that I came across that we'll want to fix:

  1. Axe-core incorrectly considers <canvas> fallback content as visible on screen. Curiously, these elements make it to the accessibility tree, and are even focusable. Because of this, most things we need axe-core to do to support HTML in canvas already exists. What's missing is a way to check if an element is rendered through HTML in Canvas. I don't know a direct way to detect if an element is painted. There might be one, but if not we can check layoutsubtree, that at least tells us if an element can't be on screen.

  2. The subtreeText function incorrectly considers canvas to be empty because of contentTypes?.includes('embedded'). That doesn't seem to matter, even without layoutsubtree.