SIA-R45Headers attribute specified on a cell refers to cells in the same table element
Accessibility requirements
This rule tests conformance of the following accessibility requirements:
Description
This rule checks that the headers attribute on a cell refer to other cells in the same <table> element.
Applicability
This rule applies to every headers attribute specified on a cell within a table element, where the table element:
- is visible; and
- is included in the accessibility tree; and
- has a semantic role of
tableor inheriting formtable.
Expectations
- Each target attribute is a set of space separated IDs, each of which is the ID of an element, that is a
cellof the sametable.
headers attribute referencing elements that are non-existent or not in the table are ignored when assigning header cells (step 3, first case, point 2).
- Each target attribute is a set of space separated IDs, none of which is the ID of the element on which the test target is specified.
headers attribute referencing to the cell itself are ignored when assigning header cells (step 3, first case, point 2).
Assumptions
- This rule assumes that the
headersattribute is only used to identify table headers. If other information is included in theheadersattribute, the rule may fail on issues that are not accessibility concerns. For example, ifheadersis used to include information for scripts, this rule may not be accurate. - This rule assumes that the
headersattribute is required to express the relationship between data and header cells in thetable. If the browser computes an adequate fallback header, this rule may produce incorrect results.
Accessibility support
This rule has no known accessibility support concerns.
Examples
Acknowledgments
This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/a25f45/. Copyright © 2024 W3C® (MIT, ERCIM, Keio, Beihang).