WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Using ARIA grids


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.

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Don Mauck
Sent: Friday, July 24, 2020 09:51
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Using ARIA grids

What has to be done in a standard table to make it scroll from the bottom and how does the scroll, I mean, what triggers JAWS or even NVDA when using table commands that are using the virtual cursor? If that makes sense. I probably did misunderstand your question/comment, if so I apologize.


Don Mauck | Senior Accessibility Evangelist | Accessibility Program Office | (APO)


-----Original Message-----
From: Jeremy Echols < <EMAIL REMOVED> >
Sent: Friday, July 24, 2020 10:46 AM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Using ARIA grids

Agreed. In fact the ARIA "grid" role can be applied to a table anyway. If the devs think adding the grid role changes any behavior, that's simply incorrect. The behavior has to be changed with JavaScript. And that same JavaScript might be possible to implement without using a special role, depending on the desired outcome and the behavior. If so, that would satisfy the need to have some behaviors without losing the navigation screen readers apply to elements with the "table" role.

The "grid" role does not in fact specifically address the issue of a table that needs to scroll. It is one thing a grid can be programmed to do, but it isn't something that is inherently a requirement for a grid.

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of glen walker
Sent: Friday, July 24, 2020 09:16
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Using ARIA grids

You might have missed the purpose of my question. I wasn't trying to explain the purpose of ARIA. It sounded like you said developers thought they had to use an ARIA grid instead of a native <table> because of scrolling issues. My question was that since ARIA doesn't affect behavior, there should not be any limitation of behavior between an ARIA grid and a native <table>. I was trying to get clarification if that's what the developers thought.

Now, there might be a difference in behavior in how a screen reader surfaces a grid vs a table with regards to screen reader shortcut keys used in navigating a table. I've seen varying levels of support for role="grid"
between browser and screen reader combinations.

On Thu, Jul 23, 2020 at 3:23 PM Don Mauck < <EMAIL REMOVED> > wrote:

> My point was that they chose to use an ARIA-Grid. I'm very much aware
> of ARIA and what it is for. That was a choice the developer made not mine.
> -----Original Message-----
> From: glen walker < <EMAIL REMOVED> >
> Sent: Thursday, July 23, 2020 3:19 PM
> To: WebAIM Discussion List < <EMAIL REMOVED> >
> Subject: Re: [WebAIM] Using ARIA grids
> I'm a little confused by this statement: "developers...using ARIA
> Grid controls since apparently tables do not allow for automatic scrolling".
> Using an ARIA attribute should have no effect on the behavior of an
> element. ARIA attributes are hints to assistive technology. See
> https://urldefense.com/v3/__https://www.w3.org/TR/aria-in-html/*native
> semantics__;Iw!!GqivPVa7Brio!JyRXeOkkEI9ydr2OY7TZhxMFR1WxFFs73HlXjIQ6B
> dl7l4TRcMO3qLM1dC36LKs$ which says, "Adding an ARIA role will not make
> an element look or act differently for people not using assistive
> technology. It does not change the behaviours, states and properties
> of the host element but only the native role semantics."
> That statement is talking about the role attribute specifically, but
> can be applied to aria-* attributes too.
> So when you say having an aria grid allows automatic scrolling but
> native tables do not, I don't follow why that's true.