Rule library Tables

Table headers in a data table must refer to data cells

th-has-data-cellsWCAG 2.0 A

Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe

Who this affects

Table headers are not linked to any data cells, so screen readers cannot announce which column or row a value belongs to.

How to fix it

Use scope="col" / scope="row" on headers, or headers/id references in complex tables.

Effort Low · ~20 min per table

Before and after

Fails

<tr><th>Size</th><th>Price</th></tr>

Passes

<tr>
  <th scope="col">Size</th>
  <th scope="col">Price</th>
</tr>

Where this sits in the standard

WCAG success criterionLevelEN 301 549 clause
1.3.1 Info and RelationshipsA301-549, 9.1.3.1

EN 301 549 clause 9 applies these criteria to web content. The published version referenced by the European Accessibility Act is V3.2.1, which incorporates WCAG 2.1 level A and AA. More on the standard.

How to check it by hand

Move cell by cell with the screen reader's table commands. Each cell should announce its row and column headers. If it reads only the value, the association is missing.

Automated testing settles roughly a third of the WCAG success criteria. This rule is one an automated tool detects reliably — but a clean automated result is not proof of conformance.

Reference

Deque's technical write-up for this rule: th-has-data-cells

See whether your site trips this rule

Paste a URL. We open it in a real browser, dismiss the cookie wall and run the full EN 301 549 rule set. No account, no card.

Run a free scan All rules