We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

th-has-data-cells

Web validation

Table header cells must reference data cells they describe.

This validation checks that each <th> element in a data table actually functions as a header for one or more data cells. A table header must describe data in the table and be programmatically associated with those cells. If a header cell does not correspond to any data cells, assistive technology may present confusing or incorrect table relationships. Proper associations ensure users can understand how rows and columns relate when navigating a table.

Pass Patterns

Table headers describe the content of their corresponding column

The header cells correctly describe column data using the scope="col" attribute. Each header corresponds to the data cells beneath it.

HTML
<table>
    <caption>Employee Directory</caption>
    <tr>
        <th scope="col">Name</th>
        <th scope="col">Department</th>
        <th scope="col">Location</th>
    </tr>
    <tr>
        <td>Maria Chen</td>
        <td>Engineering</td>
        <td>Seattle</td>
    </tr>
    <tr>
        <td>David Singh</td>
        <td>Marketing</td>
        <td>London</td>
    </tr>
</table>

Table headers describe the content of their corresponding rows

Row headers correctly describe the data in their row using scope="row".

HTML
<table>
    <caption>Quarterly Sales</caption>
    <tr>
        <th scope="col">Quarter</th>
        <th scope="col">Revenue</th>
    </tr>
    <tr>
        <th scope="row">Q1</th>
        <td>$120,000</td>
    </tr>
    <tr>
        <th scope="row">Q2</th>
        <td>$135,000</td>
    </tr>
</table>

Fail Patterns

Incorrect scoping of table headers

The header cells are scoped incorrectly. They claim to be row headers even though they describe columns, which prevents proper associations with the data cells.

HTML
<table>
    <tr>
        <th scope="row">Name</th>
        <th scope="row">Department</th>
    </tr>
    <tr>
        <td>Maria Chen</td>
        <td>Engineering</td>
    </tr>
</table>

Table structured only with table headers

Header cells exist but do not correspond to any data cells, so they do not function as real table headers.

HTML
<table>
    <tr>
        <th>Last Name</th>
        <th>First Name</th>
        <th>City</th>
    </tr>
    <tr>
        <th>Imari</th>
        <th>Henry</th>
        <th>Phoenix</th>
    </tr>
</table>

WCAG techniques

Sufficient techniques

Try It Yourself

Using a screen reader

New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers

  1. Load the page and open a screen reader, then move focus into the data table.
  2. Navigate cell by cell with the table-navigation commands of your screen reader.

Expected result: The screen reader announces the correct column or row header when you enter each data cell.

Actual result: Table cells are announced without the correct header or with misleading header information.

FAQ

How does this issue relate to 1.3.1 Info and Relationships?

This success criterion requires that relationships conveyed visually are also available programmatically. Table headers define relationships between rows, columns, and their data cells. If a <th> element does not describe any data cells, assistive technologies cannot correctly communicate those relationships.

Why is this issue marked as Serious?

Tables rely on header associations to convey structure. When header cells do not correspond to data cells, assistive technology may misinterpret the table structure or omit important context during navigation. This makes it harder for assistive technology users to understand tabular data accurately.

Standards and Regulations

StandardSuccess CriterionReference
WCAG 2.21.3.1 Info and Relationships (A)Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.
EN 301 5499.1.3.1 Info and RelationshipsSame as the WCAG text.
Section 5081194.22(g)Row and column headers shall be identified for data tables.
508 Trusted Tester1.3.1-cell-header-association, 14.BAll data cells are programmatically associated with relevant headers.

Personas impacted by this issue

Learn More