WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: How to give screen reader instructions for a grid

for

From: Mark Magennis
Date: Mar 6, 2024 3:53AM


Thanks Birkir and Tim for giving your advice. Whilst I generally agree that if a widget like this works in the expected way - e.g. tab in, arrow around, tab out - then there should be no need to provide instructions, and this one does work in the expected way. However, the problem we have and the reason I want to provide a warning/instructions is that AG Grid is being used for all data grids in the product, including ones like this that are essentially just data tables and up until now have always been just data tables. So existing users will expect to navigate these 'tables' in the same way they always have. Another issue is that it seems to me that grids aren't very common in the wild and have the typical complexity of such widgets for users of modal screen readers such as JAWS and NVDA in that they require the user to enter forms mode to use the grid keyboard navigation. If the user tabs into the grid and has the default screen reader settings they will automatically enter forms mode but if they arrow into it, which in the context I'm looking at seems more likely, then they will not automatically enter forms mode. Entering forms mode manually requires them to press Enter but this doesn't work when they first get into the grid but only when they reach the first column header. Plus, a surprisingly large number of JAWS and NVDA users don't seem to be aware of the existence forms mode and how to manually enter or exit it. I know it's not the product vendor's job to teach someone how to use their access technology, but that is the environment we're working in and I think a simple warning/instruction would therefore help in this specific case. Regarding your point about non-screen-reading keyboard users Tim, yes you are generally right but in this case there are no interactive elements within the grid so keyboard users won't need to interact with it. The fact that the warning/instructions therefore only apply to screen reader users is another complication to think about when deciding how to present them. Plus the need to ensure that users will come across his guidance however they reach the grid.

Having played around with all sorts of ways of delivering this guidance I'm leaning towards a simple hidden link to a Help page that will appear on focus and explain grid navigation in general, including other grids in the product that are more complex and do contain many interactive elements.

Thanks,
Mark
From: WebAIM-Forum < <EMAIL REMOVED> > on behalf of Birkir R. Gunnarsson < <EMAIL REMOVED> >
Sent: Monday 4 March 2024 17:36
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: [EXTERNAL] Re: [WebAIM] How to give screen reader instructions for a grid

If the keyboard navigation follows that of a standard grid (i.e. arrow
keys navigate between cells) you don't need much in the way of extra
instructions.
There are various practices you need to support for this to be natural:
* If the gridcell has a focusable control inside it, focus should go
directly to that control when user navigates to the cell with the
arrow keys, it should not go on the cell.
However, If the cell does not have a focusable descendants, then focus
should go on the cell
If the cell has multiple focusable elements inside it you are going to
hvae a lot of keyboard and screen reader confusion, can users arrow or
tab between those etc. In this scenario you need to either change the
decide or create a menu button that users have to activate to see the
interactive options (see the example grids for data grid in the ARIA
Authoring Practices, test the one where you can assign a new category
and observe how that works)
One ting specific to AG Grid, if authors decide to pin one of the
columns in the grid the grid becomes inaccessible, there must be an
option to unpin all columns (if pinned), at least until AG Grid gets
its act together and fixes this.

I have used a combination of "how to use this grid" screen reader only
section before the grid, starting with an h3 heading and
aria-describedby on the grid control saying (for screen reader
instructions navigate to previous h3 heaing). It isn't elegant, it
does not always work but it is about as good as we can make it
If you page has a skip link you could attach a tooltip to that link
saying (if you want keyboard and screen reader instructions for a grid
go to x" because only screen reader and keyboard users will interact
with the skip link.

aG Grid is a bit of a mixed bag when it comes to accessibility, but if
you stick to the principles of keeping one data and one interactive
control in each cell, then you end up with a mostly accessible
experience.



On 3/4/24, Mark Magennis < <EMAIL REMOVED> > wrote:
> I appreciate you passing on your buddy's suggestions Dean. They're all
> sensible but I've already considered or tried all of them out and found that
> they either don't work or they raise other issues. They're not trash
> though.
>
> Thanks,
> Mark
> > From: WebAIM-Forum < <EMAIL REMOVED> > on behalf of
> <EMAIL REMOVED> < <EMAIL REMOVED> >
> Sent: Monday 4 March 2024 16:56
> To: WebAIM Discussion List < <EMAIL REMOVED> >
> Subject: [EXTERNAL] Re: [WebAIM] How to give screen reader instructions for
> a grid
>
> [You don't often get email from <EMAIL REMOVED> . Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Hey Mark,
> I was interested in this issue, but I didn’t have the answer. So, I asked my
> buddy Chat, and here is what he said:
> [It sounds like you're facing a challenge with making keyboard navigation
> instructions accessible to screen reader users in your AG Grid setup. Here
> are a few suggestions you could try to improve accessibility:
>
> 1. Use aria-describedby with an ID reference: Instead of using aria-label
> directly on the <div role="grid">, try using aria-describedby with a
> reference to an element containing the instructions. This can help screen
> readers associate the instructions with the grid.
> htmlCopy code
> <div role="grid" aria-describedby="grid-instructions"> <!-- Grid content -->
> </div><div id="grid-instructions" class="visually-hidden"> Keyboard
> navigation instructions: Use arrow keys to navigate rows and columns.
> </div>
> In this example, visually-hidden class is used to hide the instructions
> visually but keep them accessible to screen readers.
>
> 1. Ensure focusability of the grid: Make sure that the grid container is
> focusable, so screen readers can reach it easily. You may need to set
> tabindex="0" on the grid container if it's not already focusable.
> 2. Provide keyboard navigation instructions in other accessible ways:
> Consider providing keyboard navigation instructions outside of the grid as
> well, such as in a prominent location on the page or in a help section. This
> ensures that users can access the instructions regardless of how they
> navigate to the grid.
> 3. Test with different screen readers: While you mentioned that most
> users will likely use JAWS, it's still a good idea to test with other screen
> readers like NVDA or VoiceOver to ensure compatibility across different
> assistive technologies.
> 4. Check for JavaScript focus management: Ensure that JavaScript event
> handlers or focus management within the grid aren't interfering with screen
> reader navigation.
> 5. Consider contacting the AG Grid support: If the issue persists, you
> might want to reach out to AG Grid support for assistance. They may have
> specific recommendations or solutions tailored to their grid component.
> By combining these techniques, you can hopefully improve the accessibility
> of keyboard navigation instructions for screen reader users in your AG Grid
> implementation.]
> Please let me know if this helps, or if it is trash😊
> Dino
>
> Dean Vasile
>
>
> 617-799-1162
>
> On Mar 4, 2024, at 11:06 AM, Mark Magennis < <EMAIL REMOVED> >
> wrote:
>
> Hello all, I need some help. I have a page that's using AG Grid for a data
> table (non-negotiable), so it's coded as <div role="grid"> and has its own
> keyboard navigation. I want to tell screen reader users what the keyboard
> navigation is, so I added instructions in an aria-label on the <div
> role="grid">. Problem is, I suspect most users will probably arrow into the
> grid and the aria-label is only read by JAWS when you Tab into the grid, not
> when you arrow into it. Most of the screen reader users will be using JAWS.
> I've tried adding the aria-label to other elements within the grid, I've
> tried using aria-labelledby and aria-describedby instead of aria-label, but
> I can't get JAWS to read the instructions. I've tried duplicating the
> instructions in a hidden text span before the grid but it proves quite
> difficult to give instructions that will work from that point. Any ideas on
> other possible solutions?
>
> Thanks,
> Mark
>
> > > https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flist.webaim.org%2F&data%7C02%7CMark.Magennis%40skillsoft.com%7C58ccbb6a27504af6adbe08dc3c719c14%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638451705863140429%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=rtOFLvISZYebwIpSj6hkuOVL23%2F5PnVlySAJtw%2Ft%2BFc%3D&reserved=0<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flist.webaim.org%2F&data%7C02%7CMark.Magennis%40skillsoft.com%7C58ccbb6a27504af6adbe08dc3c719c14%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638451705863148733%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=EjBsFAKnEYrZQlfGtbak4%2BW%2FHOiMzWXzLGfbV5Sfo60%3D&reserved=0><http://list.webaim.org/>;
> List archives at
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwebaim.org%2Fdiscussion%2Farchives&data%7C02%7CMark.Magennis%40skillsoft.com%7C58ccbb6a27504af6adbe08dc3c719c14%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638451705863152540%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata£xDRzR5LD7GWdD6jla8oqyxQ0hi4WYWQ3aJPiPIOSE%3D&reserved=0<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwebaim.org%2Fdiscussion%2Farchives&data%7C02%7CMark.Magennis%40skillsoft.com%7C58ccbb6a27504af6adbe08dc3c719c14%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638451705863156160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=m5lMTPsjKymAUgpq1tCOPsZ3uvAHIjW3bstqfghXQ8g%3D&reserved=0><http://webaim.org/discussion/archives>;
> > > > https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flist.webaim.org%2F&data%7C02%7CMark.Magennis%40skillsoft.com%7C58ccbb6a27504af6adbe08dc3c719c14%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638451705863159790%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=1v9%2BLGXnzyOANP30gE7bjufuo1fN6EvU3sREbeNyrBk%3D&reserved=0<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flist.webaim.org%2F&data%7C02%7CMark.Magennis%40skillsoft.com%7C58ccbb6a27504af6adbe08dc3c719c14%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638451705863163375%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=6OlwvBbZSRMsJRk%2FksxlbeFiOFa41EOILljFGoP4BZE%3D&reserved=0><http://list.webaim.org/>;
> List archives at
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwebaim.org%2Fdiscussion%2Farchives&data%7C02%7CMark.Magennis%40skillsoft.com%7C58ccbb6a27504af6adbe08dc3c719c14%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638451705863167042%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdataácK3b6uE%2F9N%2FYYNqVpvaWgsu5jxT2g7cicFClL2s74%3D&reserved=0<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwebaim.org%2Fdiscussion%2Farchives&data%7C02%7CMark.Magennis%40skillsoft.com%7C58ccbb6a27504af6adbe08dc3c719c14%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638451705863170508%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=3UzVX6%2FHu7vz53aAPN%2BNCN9BkAUG7SJhvO8QuJy5MwQ%3D&reserved=0><http://webaim.org/discussion/archives>;
> > > > > >


--
Work hard. Have fun. Make history.