You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most screen readers have the ability to navigate by table and to pull up a list of tables. In navigating a page that way it is helpful to make sure all tables have an accessible name. It is therefore a best practice for all tables to have an accessible name.
We need to do some testing to figure out what types of tables will be navigated / listed by screen readers. Native <table> elements definitely. I'm not sure if elements with role="table" and/or role="grid" are too. If they do. We'll need to gather some test data about this before we can write this rule.
The text was updated successfully, but these errors were encountered:
As mentioned in issue 4697 there is an odd discrepancy between HTML and ARIA in this regard.
HTML does not require that a <table> element has a <caption> but the ARIA spec requires that an element with the table role has an accessible name (see section 5.2.8 and the definition for the table role).
As someone who has depended on a screen reader for over 30 years I find this requirement nice but not "supremely necessary".
My recommendation fow ehen this would be required:
Any <table> element that does not have role="presentation" or role="none"
Any <table> element that does not pass the layout table algorithm: That is any <table> with a <th> cell, a cell with role="columnheader" or cell with role="rowheader".
Include ARIA based tables:
Any element with role="table"
Any element with role="grid"
(authors that use the table role explicitly are very likely intending to build a table or grid)
Note: For ARIA table or grid roles you could also require at least one descendant with a columnheader or rowheader role), though I believe the layout algorithm guess is not performed for ARIA tables or grids.
As for rule severity, I'd recommend moderate. Users are not used to accessible names for tables.
More specifically, I would recommend that an accessible name is required for a table only when there are two or more tables on the page, but that goes against the ARIA spec and could also create confusion.
Most screen readers have the ability to navigate by table and to pull up a list of tables. In navigating a page that way it is helpful to make sure all tables have an accessible name. It is therefore a best practice for all tables to have an accessible name.
We need to do some testing to figure out what types of tables will be navigated / listed by screen readers. Native
<table>
elements definitely. I'm not sure if elements withrole="table"
and/orrole="grid"
are too. If they do. We'll need to gather some test data about this before we can write this rule.The text was updated successfully, but these errors were encountered: