Skip to main content
WCAGrules
Quick navigation

Caption data tables so their purpose is clear

A caption element, placed first inside a table, gives that table a title assistive technology can find and announce. W3C lists H39 as sufficient for 1.3.1 Info and Relationships, in the sense of taking a relationship the layout already shows and making it available to software too. The test is narrower than people expect. It runs where a visible title already sits above the table and needs binding to it, rather than demanding a caption on every table ever written. There is one place a caption is actively wrong. A table used purely for layout is meant to be invisible to a reader, and a caption breaks that transparency and creates a separate failure. WCAG does not ban layout tables. It does mean a layout table gets no caption, no th and no summary.

How we find it in an audit

A scanner lists tables with no caption, which is a starting point rather than a finding, because a missing caption only matters when nothing else names the table. So we read what sits around it. Then we flag the captions that say nothing, because Table 4 is a caption and it is not a title.

How affected users experience it

Screen reader users often ask for a list of the tables on a page and jump straight to the one they want. With captions, that list reads Quarterly revenue by region, then Shipping rates by weight, and the choice takes a second. Without them it reads table with six columns and 40 rows, twice over, and the only way to tell them apart is to start reading cells.

Passes vs. fails

Passes: headings exist in the code. Fails: one flat wall of text.

Passes

<table>
  <caption>Quarterly revenue by region</caption>
  <tr><th scope="col">Region</th><th scope="col">Q1</th></tr>
  <tr><td>North</td><td>412,000</td></tr>
</table>

Fails

<table>
  <tr><th>Region</th><th>Q1</th></tr>
  <tr><td>North</td><td>412,000</td></tr>
</table>

How this gets tested

The W3C publishes test rules that define what a checker looks for here.

Other ways to satisfy this rule

52 guides on this site are filed under 1.3.1 Info and Relationships. W3C lists this one as sufficient for that rule when used for making information and relationships conveyed through presentation programmatically determinable, so the condition is part of the test rather than a footnote to it.

This guide is our interpretation of W3C technique H39: Using caption elements to associate data table captions with data tables. W3C publishes its techniques as guidance rather than as the standard, and says so on every one of them. The success criterion is what conformance is measured against, and a technique is one documented way to meet it.

Go somewhere useful

Find tools, resources and your workspace.

29 destinations