Table headers in a data table must refer to data cells
How to fix the th-has-data-cells accessibility rule. Tables.
What this rule checks
Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe
Who is affected
A table header doesn't describe any cells, which confuses screen-reader table navigation.
How to fix it
Make sure every <th> labels real data cells, or change it to <td>.
WCAG success criteria
When this rule fails, the page fails:
- 1.3.1 Info and Relationships (Level A, WCAG 2.0, 2.1, 2.2)
Find it on your own page
Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools.
More detail
- Deque University’s reference for th-has-data-cells (the makers of axe-core, the engine our scanner uses)
- All fix guides