Data Tables With Heading Tags Missing Scope Attributes

Data Tables With Heading Tags Missing Scope Attributes

WCAG Focus: WCAG 1.3.1 (A) · Technique H63

Even when a WordPress table uses <th> elements, omitting scope="col" or scope="row" leaves ambiguity—especially when a table has both column headers across the top and row headers down the left side.

Why This Pattern Violates WCAG

WCAG 1.3.1 Info and Relationships (Level A) and Technique H63 recommend explicit scope="col" on column headers and scope="row" on row headers so screen readers announce the exact header for every data cell.

Code Comparison

Table Headers Missing Scope Attributes

<table>
  <tr><th>Feature</th><th>Basic</th><th>Pro</th></tr>
  <tr><th>Support</th><td>Email</td><td>24/7 Phone</td></tr>
</table>

Compliant Table With Scope Attributes

<table>
  <thead>
    <tr><th scope="col">Feature</th><th scope="col">Basic</th><th scope="col">Pro</th></tr>
  </thead>
  <tbody>
    <tr><th scope="row">Support</th><td>Email</td><td>24/7 Phone</td></tr>
  </tbody>
</table>

How to Fix It in WordPress

  • Add scope="col" to column header <th> cells and scope="row" to row header <th> cells.
  • Use scope="colgroup" or scope="rowgroup" for multi-column/multi-row header spans.

Finding This Issue Automatically

Even Gutenberg’s default Table block omits scope attributes on header cells unless added. Running the WP ADA Compliance Check plugin flags data tables with <th> elements missing scope attributes so every cell reads with accurate context.

WCAG References & Supporting Materials

WCAG Success Criteria

Supporting Documentation & Guides

Subscribe

Subscribe to receive daily Web Accessibility - Did you know? articles in your inbox.

Cart Accessibility Tools
hide