Serious1.3.1 Info and Relationships (Level A)Rule ID: td-headers-attr
Table data cells with headers attribute must reference valid headers
`<td headers="...">` references IDs that do not exist or do not point to `<th>` elements.
Rule Description
Checks that all IDs listed in td[headers] exist, are unique, and reference proper table header cells.
Why It Matters
- Screen readers cannot associate cells to correct headers
- Complex tables become difficult to understand
- Users may interpret data under wrong categories
How to Fix
Ensure each ID in headers exists and belongs to a relevant <th>.
Bad Example:
<th id="name">Name</th> <td headers="missing-id">Alex</td>
Good Example:
<th id="name">Name</th> <td headers="name">Alex</td>
Common Mistakes
- Typos in
headersIDs - Referencing non-header elements
- Stale IDs after refactoring table markup
Testing
- Validate DOM IDs used by
headers - Use screen reader table reading commands
- Confirm correct header announcement per cell
External Resources
Automate Your Accessibility Testing
Our tool automatically checks for this rule and hundreds of other accessibility issues.
Start Your Free Trial