Dieser Inhalt ist derzeit nur auf Englisch verfügbar
Audit td-headers-attr
Ensure that each cell in a table that uses the headers attribute refers only to other <th> elements in that table
Impact:
Serious
WCAG-Konformität:
A
WCAG 1.3.1
Issue types:
failure, needs review
Headers attribute specified on a cell refers to cells in the same table element
This rule checks that the `headers` attribute on a cell refer to other cells in the same `table` element.
Content loading...
Autoren: Audrey Maniez, Jey Nandakumar
Finanzierung: WAI-Tools
Applicability
This rule applies to any headers attribute specified on a cell within a table element, where all of the following is true for the table element:
The table is visible; and
The table is included in the accessibility tree; and
The table has a semantic role of table, grid or treegrid.
Expectation 1
Each target's attribute value is a set of space separated tokens. Each token is the value of the id attribute of an element, that is a cell of the same table.
Expectation 2
Each target's attribute value is a set of space separated tokens, and none of these tokens is the id of the element on which the test target is specified.
Background
Assumptions
This rule assumes that the headers attribute is only used to identify table headers. If other information is included in the headers attribute, the rule may fail on issues that are not accessibility concerns. For example, if headers is used to include information for scripts, this rule may not be accurate.
This rule assumes that the headers attribute is required to express the relationship between data and table header cells in the same table. If the browser computes an adequate fallback header for cells that have the headersattribute value that does not correspond to the id of any one cell in the same table, success Criterion 1.3.1 Info and Relationships may be satisfied even if this rule failed.
This rule assumes that the id values on the headers attribute are unique.
The headers attribute on the last two th elements refers to another th element within the same table. Here the column header has a span of two columns.
The headers attribute on the data cells in the second row refers to an element inside the same table which does not have a role of rowheader or columnheader.