Rule ID: ace-table-no-fake-caption

Detect data table captions implemented using non-caption elements

1.3.1: Info and Relationships Blind Low Vision Best Practice

What This Rule Checks

When table captions are created using merged cells or styled paragraphs instead of the proper <caption> element, screen readers cannot programmatically associate the caption with the table, making it harder for assistive technology users to understand the table purpose.

Who Is Affected

This issue primarily affects: Blind users, who rely entirely on screen readers or braille displays to navigate and interact with content; Low Vision users, who may use screen magnification, custom fonts, or high-contrast modes.

Why This Matters

Screen readers announce the <caption> when a user enters a table, providing immediate context. Fake captions (merged cells, preceding paragraphs) are not associated with the table, so screen reader users enter the table without knowing its purpose.

How to Fix

Replace fake captions (merged first-row cells, styled paragraphs above tables) with the proper <caption> element nested inside the <table>. This ensures screen readers can announce the table name when navigating.

Code Examples

Incorrect Markup Solutions:
Code example
<!-- Fake caption using merged first row --> <table> <tr> <td colspan="3"> <strong>Quarterly Results</strong> </td> </tr> <tr> <th>Q1</th> <th>Q2</th> <th>Q3</th> </tr> <tr> <td>$1M</td> <td>$1.2M</td> <td>$1.5M</td> </tr> </table> Copy
Correct Markup Solutions:
Code example
<!-- Proper table caption --> <table> <caption>Quarterly Results</caption> <tr> <th>Q1</th> <th>Q2</th> <th>Q3</th> </tr> <tr> <td>$1M</td> <td>$1.2M</td> <td>$1.5M</td> </tr> </table> Copy

Common Mistakes to Avoid

  • Using a merged first-row cell as a table title instead of <caption>.
  • Placing a styled paragraph above the table instead of using <caption>.
  • Not realizing that <caption> is semantically linked to the table for screen readers.

Tip: Data tables must use proper markup so screen readers can associate data cells with their headers. Without this association, table data becomes an incomprehensible list of values without context.

Related WCAG Criteria

  • 1.3.1: Info and Relationships