Table header cells must contain visible text
Every table header cell should contain visible text that names its row or column. This is a best practice, not a WCAG requirement, but screen readers read the header aloud with each data cell.
| Rule ID | empty-table-header |
|---|---|
| Impact | Minor |
| Success criterion | Best practice, not a WCAG requirement |
| Needs a change in the website’s code |
Example
<table>
<tr><th></th><th>Price</th><th>Stock</th></tr>
<tr><td>Oak desk</td><td>$249</td><td>12</td></tr>
</table>Moving to “Oak desk”, a screen reader announces the cell with no column name.
<table>
<tr><th>Product</th><th>Price</th><th>Stock</th></tr>
<tr><td>Oak desk</td><td>$249</td><td>12</td></tr>
</table>A screen reader announces “Product, Oak desk”.
Why it matters
Screen reader users move through tables cell by cell. When they enter a new column or row, the screen reader announces the matching header first, so “Price, $249” makes sense even out of context. An empty header cell gives them nothing, and they have to scroll back to work out what the column holds.
Sighted users can often guess from the content, for example that the first column lists product names. People using screen magnifiers see only a small part of the table at a time and cannot always make that guess either. Empty headers are common in the top-left corner of comparison tables and in columns that hold action buttons.
How to fix it
The cell names a column or row. Write the name, even if it seems obvious:
<th scope="col">Product</th>
The column holds actions (edit, delete). Give it a header such as “Actions”. If the design must not show it, keep the text but hide it visually with a utility class rather than display: none:
<th scope="col"><span class="visually-hidden">Actions</span></th>
The cell is the empty corner of a two-way table and does not head anything. Make it a regular data cell:
<tr>
<td></td>
<th scope="col">Basic</th>
<th scope="col">Pro</th>
</tr>
The header only contains an icon. Add alternative text to the icon so the header has a name, and consider adding a visible word next to it for everyone.
Note that aria-label on a <th> does not satisfy this check: the text must be in the content of the cell.
Checklist
- Write a short name in every th element.
- Use td for an empty corner cell.
- Label action columns, at least for screen readers.
- Keep header text in the cell, not only in aria-label.
How the check works
The check looks at <th> elements without a role and at elements with role="columnheader" or role="rowheader". It passes when the cell contains text that screen readers can read, including visually hidden text. It fails when the cell has no such text; an aria-label alone does not count. Check manually that each header actually describes its data.
Resources
- Tables tutorial W3C WAI
Updated October 27, 2026