Code Fix Guide

How to Fix HTML Table Accessibility Issues

Data tables without proper header markup are among the most confusing elements for screen reader users. Without <th> elements and scope attributes, screen readers can't associate data cells with their column or row headers, making tables sound like a random list of values.

Common Errors and How to Fix Them

Bold text used as headers instead of th elements
Problem
<table>
  <tr>
    <td><b>Name</b></td>
    <td><b>Price</b></td>
  </tr>
  <tr>
    <td>Widget</td>
    <td>$9.99</td>
  </tr>
</table>
Fix
<table>
  <caption>Product pricing</caption>
  <thead>
    <tr>
      <th scope="col">Name</th>
      <th scope="col">Price</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Widget</td>
      <td>$9.99</td>
    </tr>
  </tbody>
</table>

Why This Matters

Inaccessible tables violate WCAG 1.3.1 (Info and Relationships). Screen readers announce table headers before each cell value — 'Name: Widget, Price: $9.99' — but only if the headers are properly marked up with <th> and scope attributes.

Find All Your Accessibility Issues Automatically

ADA CodeFix scans your website for WCAG 2.1 AA violations and generates AI-powered code fixes — not vague descriptions, actual code you can copy-paste.

Scan Your Site Free
No credit card required AI-generated code fixes