Tables
headers must point at cells in the same table
- Rule:
td-headers-attr - Severity: Serious
- WCAG level A
Why it matters
A headers attribute referencing an id that is missing, or in another table, silently loses the association — so the cell is announced with no header at all.
How to fix it
- Check that every id in the headers attribute exists on a <th> in the same table.
- Do not point a cell at itself.
- Use scope instead where the table is a simple grid — it is far easier to keep correct.
In markup
<td headers="region-h">Berlin</td>
<!-- no cell with id="region-h" in this table --><th id="region-h">Region</th>
<td headers="region-h">Berlin</td>The requirement behind it
This rule is one way of failing the following WCAG 2.2 success criteria. The W3C, which writes the standard, explains each of them:
- 1.3.1 Info and Relationships (opens in new tab) — WCAG level A
Further reading
Deque University on td-headers-attr (opens in new tab)
Deque maintains axe-core, the open-source engine our scanner runs. Their page documents the rule as the engine implements it.
Automated checks find failures a browser can prove. They cannot judge whether a caption is accurate, whether an alt text is useful, or whether a page can be operated end to end with a keyboard — those need a person.