WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Using ARIA grids

for

From: Jeremy Echols
Date: Jul 24, 2020 1:32PM


I believe anything using a table element will trigger the screen reader to let you use its shortcuts for navigating the grid. From some quick rudimentary testing it seems the grid examples on the W3C page get a little bit weird (at least using NVDA) when trying to use the screen reader shortcuts because those conflict with the JavaScript that's implemented for navigating the grid. It may be that this is the issue you were initially describing, but it may not: an ARIA "grid" role can technically be applied to something like a pile of div elements.

Unfortunately, I can't say for sure what is the best way to achieve the outcome. The point I think Glen was trying to make is simply that adding behaviors via JavaScript is separate from whether or not the "grid" role is used. A table element may be able to get scrolling behaviors via JavaScript in a perfectly accessible way. It's just important to note the distinction between the role and the behavior. The "grid" role requires developers implement certain behaviors in JavaScript in order for the grid to be WCAG compliant. If they do this properly, the grid *should* be accessible to screen reader users.

I think this is where I'm not clear, because I don't know what the developers have built or how. if developers add a role to a pile of divs, but don't implement the correct JavaScript behaviors, that will be inaccessible and potentially a lot worse than just using a table element with minimal behaviors implemented.