WebAIM - Web Accessibility In Mind

E-mail List Archives

Best Method of Putting Canvas Element in Tabindex?

for

From: Brandon Keith Biggs
Date: Jul 29, 2019 4:24PM


Hello,
I am making games and other nonsemantic interfaces with BabylonJS, and the
engine uses a Canvas element to render graphic input and accept keyboard
input.
There is a problem though, I am not finding a good way of putting canvas
into the page.
I tried adding role="application" and putting a button in the canvas, but
the engine is not recognizing keyboard input from the canvas element when I
do this.
If I take out the button though, the canvas shows up, but I'm still not
able to focus and send keyboard events.
Is there another way to put canvas into the tabindex so screen reader users
can access it?
Thank you,


Brandon Keith Biggs <http://brandonkeithbiggs.com/>;