Use a caption element, not a merged first row, to title a table

A data table's title belongs in a `<caption>` element, not in a first row whose single cell spans all columns. This check is experimental, so results may change as it is refined.

Experimental

Rule IDtable-fake-caption
ImpactSerious
Success criterion 1.3.1 Info and Relationships · A
StandardsWCAG 2.0 · WCAG 2.1 · WCAG 2.2 · Section 508 · EN 301 549
Readabler fix Needs a change in the website’s code

Example

Before
<table>
  <tr><th colspan="3">Opening hours</th></tr>
  <tr><th scope="col">Store</th><th scope="col">Weekdays</th><th scope="col">Sunday</th></tr>
  <tr><td>Leeds</td><td>9:00–19:00</td><td>11:00–17:00</td></tr>
</table>

On “11:00–17:00”, a screen reader may announce “Opening hours, Sunday”, treating the title as a column header.

After
<table>
  <caption>Opening hours</caption>
  <tr><th scope="col">Store</th><th scope="col">Weekdays</th><th scope="col">Sunday</th></tr>
  <tr><td>Leeds</td><td>9:00–19:00</td><td>11:00–17:00</td></tr>
</table>

A screen reader names the table “Opening hours”, then reads “Sunday, 11:00–17:00”.

Why it matters

Screen reader users often list the tables on a page or jump from one to the next. The screen reader announces each table by its caption, so they can tell a price list from a timetable without reading every cell. A title placed in a merged first row is just another cell: the table has no name, and the title is treated as part of the data.

Worse, a merged cell at the top counts as a header for every column below it. Some screen readers then repeat the title before every value, which buries the real headers. Voice control users and people using reading tools lose the link between title and table too.

The <caption> element fixes all of this and can be styled exactly like the merged row.

How to fix it

Replace the merged first row with a <caption> element, placed directly after the opening <table> tag.

Title in a spanning cell. Move the text into a caption and delete the row:

<table>
  <caption>Opening hours</caption>
  <tr><th scope="col">Store</th>...</tr>
</table>

Keep the look. A caption can be styled to match your design, including alignment and background:

caption {
  text-align: left;
  font-weight: bold;
  padding: 0.5rem;
  background: #f2f2f2;
}

Use caption-side: bottom if the title should appear below the table, as in some reports.

Title already shown as a heading above the table. You can skip the caption and name the table with aria-labelledby instead:

<h2 id="hours">Opening hours</h2>
<table aria-labelledby="hours">...</table>

Layout table. If the table is used only for visual layout, rebuild it with CSS grid or flexbox, or add role="presentation".

Checklist

  1. Put each table's title in a caption element.
  2. Remove first rows that only hold a spanning title.
  3. Style the caption instead of a merged cell.
  4. Use aria-labelledby when a heading already names the table.

How the check works

The check looks at tables it identifies as data tables. It fails when the table has more than one row and more than one column, and every cell position in the first row belongs to the same single cell, meaning one cell spans the whole width. Because the check is experimental, review merged rows by hand: a spanning header that groups columns may be intentional.

Resources

Updated October 27, 2026