Thanks to visit codestin.com
Credit goes to github.com

Skip to content

update role allowances for tr, th, td #1125

@scottaohara

Description

@scottaohara

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, columnheader are 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions