Dieser Inhalt ist derzeit nur auf Englisch verfügbar
Audit th-has-data-cells
Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe
Impact:
Serious
WCAG-Konformität:
A
WCAG 1.3.1
Issue types:
failure, needs review
Table header cell has assigned cells
This rule checks that each table header has assigned cells in a table element.
Content loading...
Autoren: Audrey Maniez, Helen Burge, Jey Nandakumar
Finanzierung: WAI-Tools
Applicability
This rule applies to any HTML element with a semanticrowheader or columnheader for which all of the following is true:
the element is visible; and
the element is included in the accessibility tree; and
the element has at least one ancestor in the flat tree that is a semantictable or grid; and
the element's closest ancestor in the flat tree that is a semantictable or grid is included in the accessibility tree.
Expectation
Each target element is assigned to at least one element with an inheriting semanticcell.
Background
The roles inheriting from cell are columnheader, gridcell, and rowheader.
Assumptions
This rule assumes that table header cells have a relationship conveyed through presentation with other cells within the same table. This excludes edge cases such as a table definition where there is only one header cell, or a table definition where there are multiple headers and no other cells. In such scenarios the rule fails, but success criterion 1.3.1 Info and Relationships could still be satisfied.
Accessibility Support
Table markup and header cell association is not well supported by some popular assistive technologies. Passing this rule can still cause issues for users of those assistive technologies.
Implementation of Presentational Roles Conflict Resolution varies from one browser or assistive technology to another. Depending on this, some elements can have one of the applicable semantic roles and fail this rule with some technology but users of other technologies would not experience any accessibility issue.
This th element with id equal to "col2" does not have an assigned cell within the same table element because the headers attribute removes the cell association from its column.
<table><tr><thid="col1">Country</th><thid="col2">Starting with a Z</th></tr><tr><td>Zambia</td><tdheaders="col1">Zimbabwe</td></tr></table>
Failed Example 3
This div with role of columnheader and text equal to "Occupant" does not have an assigned cell within the same table element.
This th element is neither visible nor included in the accessibility tree and there are no more elements with a semantic role of header within the table element.