question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve accessibility: using a <table> element at the top-level

See original GitHub issue

My organization is using react-virtualized with an application that must support screenreaders using JAWS. While react-virtualized has excellent support for keyboard navigation (tab-index), and adds the proper role/aria-labels, it is still not properly read by JAWS or mac voiceover. Problems:

  • “table mode” is not usable. Unable to read/navigate cell-by-cell
  • Interactive elements (links, buttons, etc) are not read by the screenreader, even when tabbable
  • Screenreader will not provide context on number of columns/rows, and where you are currently focused within the table.

In the end, it seems that no matter what aria-labels and roles are used, a screenreader won’t read and give the same functionality as a full on table. Changing the top level element to <table class="ReactVirtualized__Table" role="grid"> resolved all three of my problems. Note: all children remain as <div>s, so no <tr>, <td> etc need be used.

Example audio from Jaws with the current react-virtualized implementation: https://drive.google.com/open?id=0BxS1c0ZghPGvcGdjQ1FqRHpYMjg

Example audio from Jaws with the new <table> implementation: https://drive.google.com/open?id=0BxS1c0ZghPGvaC03VGktZ0dXMlE

My question to you is: Is there any reason this would be a bad idea that I haven’t considered? If not, then I’ll open a PR to the library to make this change.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
cerinmancommented, Nov 7, 2017

We were running into a similar issue with screen readers not reading but as soon as we added role="Tabpanel" to the List component everything worked with no issues. Noting here incase it helps someone else. 👍

0reactions
lmcnamara-SMARcommented, Jul 28, 2021

My organization is using react-virtualized with an application that must support screenreaders using JAWS. While react-virtualized has excellent support for keyboard navigation (tab-index), and adds the proper role/aria-labels, it is still not properly read by JAWS or mac voiceover. Problems:

  • “table mode” is not usable. Unable to read/navigate cell-by-cell
  • Interactive elements (links, buttons, etc) are not read by the screenreader, even when tabbable
  • Screenreader will not provide context on number of columns/rows, and where you are currently focused within the table.

In the end, it seems that no matter what aria-labels and roles are used, a screenreader won’t read and give the same functionality as a full on table. Changing the top level element to <table class="ReactVirtualized__Table" role="grid"> resolved all three of my problems. Note: all children remain as <div>s, so no <tr>, <td> etc need be used.

Example audio from Jaws with the current react-virtualized implementation: https://drive.google.com/open?id=0BxS1c0ZghPGvcGdjQ1FqRHpYMjg

Example audio from Jaws with the new <table> implementation: https://drive.google.com/open?id=0BxS1c0ZghPGvaC03VGktZ0dXMlE

My question to you is: Is there any reason this would be a bad idea that I haven’t considered? If not, then I’ll open a PR to the library to make this change.

Are you use the Table or Grid primitive to render your table?

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 ways to improve table accessibility - Rachele DiTullio
1) Caption that table · 2) Include header text for every column · 3) Use alt attributes meaningfully · 4) Have data in...
Read more >
HTML table advanced features and accessibility
One clear way to do this is by using <thead> , <tfoot> , and <tbody> , which allow you to mark up a...
Read more >
Adding accessible tables to Extension scholastic works or ...
How to create more accessible tables for use in webpage versions of Extension scholastic works ... Or, click in the last cell of...
Read more >
Building Accessible Menu Systems - Smashing Magazine
Make sure each top-level destination page has a table of contents as an ... accessible, the best thing you can do is use...
Read more >
Tips and Tricks | Web Accessibility Initiative (WAI) - W3C
Don't use line breaks ( <br> elements) to create table rows as the data in the pseudo-rows may no longer align correctly when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found