WCAGdesk
axe-core: th-has-data-cells · WCAG 1.3.1 Info and Relationships · Level A

How to fix the “th-has-data-cells” accessibility issue

The axe-core th-has-data-cells rule fails when a <th> header has no data cells associated with it — usually a sign a layout table is using <th>, or a data table's headers are not wired to its cells. WCAG 2.2 (1.3.1, Level A).

What axe-core checks

axe-core checks that every <th> in a data table has corresponding <td> cells in its row or column.

Which standard this maps to

WCAG 2.21.3.1 Info and Relationships (Level A)
EN 301 5499.1.3.1
BFSG / EAABFSG § 12 via EN 301 549 · EAA Annex I
CategoryStructure & Landmarks

Why it matters

Spec tables, size charts and order histories are real data tables. If the header/cell relationship is broken, a screen reader reads the numbers without their column meaning — “42” instead of “EU size: 42”. The companion rule td-headers-attr covers the reverse wiring.

Common causes

  • A layout table built with <th> elements
  • Header cells in a table that has no data rows
  • <th> used for styling a normal cell
  • Complex tables missing scope or headers/id wiring

How to fix it

Use <th> only for real headers in data tables, and add scope="col"/scope="row". Do not use tables for layout.

<table>
  <tr><th scope="col">Size</th><th scope="col">Chest</th></tr>
  <tr><td>M</td><td>96 cm</td></tr>
</table>

FAQ

Should I use tables for layout?

No. Use CSS grid/flex for layout; reserve <table> for genuine tabular data.

scope or headers/id?

scope is enough for simple tables. Use headers/id only for complex tables with merged or multi-level headers.

Find every issue like this on your site

Run a free WCAG 2.2 AA scan — real axe-core engine, no signup. Or get a timestamped evidence report for €29.