A data table should have an accessible name
Rule
data-table-caption· Component patterns (best practice) · impact moderate · Static + live
Why it matters
A caption (or equivalent accessible name) gives a data table a heading that screen-reader users hear when they enter it and can use to find it in the table list. Layout tables (no header cells, or role="presentation"/"none") are excluded — only tables that convey tabular data are checked.
How to fix
Add a
Example
<table><tr><th>Name</th></tr><tr><td>Ada</td></tr></table>
<table><caption>Users</caption><tr><th>Name</th></tr><tr><td>Ada</td></tr></table>
WCAG success criteria
1.3.1 Info and Relationships — Level A
Structure and relationships conveyed visually (headings, lists, tables, labels, groups) must also be available programmatically.
Standards
This rule contributes to the following standards:
WCAG A EN 301 549
| Standard | Criteria |
|---|---|
| EN 301 549 | 9.1.3.1 |