-
Notifications
You must be signed in to change notification settings - Fork 312
Description
when used within a role=table, grid, treegrid the td, tr, and th elements should not be allowed any explicitly set role, as that would break the a11y mappings of the table, grid or treegrid.
td in role=table
td in role=grid
td in role=treegrid
tr in role=table
tr in role=grid
tr in role=treegrid
th in role=table
th in role=grid
th in role=treegrid
expectations:
- if a
<td>'s ancestor table element has role=table, grid or treegrid - then no allowed role. - if a
<th>'s ancestor table element has role=table, grid or treegrid - then no allowed role. - if a
<tr>'s ancestor table element has role=table, grid or treegrid - then no allowed role. - if any use of
cell,gridcell,row,rowheader,columnheaderare found on these elements - then those should produce warnings as being unnecessary
if a td, tr, or th are used within a table with no set role, thus it should be an implicit role=table (regardless of what browser heuristics may do) - then no allowed role
td within a table testcase
th within a table testcase
tr within a table testcase
If td, tr, or th are used within a table where it's role is overwritten by a role not mentioned above (e.g., role=none, article, etc), then these elements can continue to allow any role. the validator already meets this expectation