table-fake-caption

A table's first row should not stand in for a real <caption>

manualWCAG 1.3.1 (A)confidence: lowseverity: minorperceivable

Flags tables with no <caption> whose first row has a single non-empty cell while other rows have multiple cells, for manual review of whether that cell is acting as a fake caption.

Applies to. `<table>` elements with no `<caption>` child, at least two rows, and a first row containing exactly one non-empty-text cell while at least one other row has more than one cell.

Expectation. A single lone cell in the first row, sitting above rows that clearly have multiple columns, strongly suggests the author is using it as a visual caption/title rather than as a real table cell. Structure conveyed only through this positional convention is not programmatically associated with the table the way a real `<caption>` element is (1.3.1).

Examples

can't tell
<table>
<tr><td>Monthly Sales Report</td></tr>
<tr><td>Jan</td><td>100</td></tr>
<tr><td>Feb</td><td>200</td></tr>
</table>

A lone cell sits alone in the first row above rows that all have multiple cells, and there's no real `<caption>` — it looks like a caption pretending to be a data cell.

n/a
<table>
<caption>Monthly Sales Report</caption>
<tr><td>Title cell</td></tr>
<tr><td>Jan</td><td>100</td></tr>
</table>

The table has a real `<caption>` element.

View source