For each data table that has a title, is the title correctly associated with the data table?
A screen reader user navigates from table to table using the « T » key on NVDA. At each stop, the reader announces the table title. If this title exists visually but is not correctly associated in code, the reader says « table with 3 columns » — and the user must scan the headers to understand what it is.
This criterion only applies if a title is present. Four techniques validate the association: a <caption> element, a title attribute on the <table> tag, an aria-label attribute, or an aria-labelledby that points to existing text passage on the page. The title must be linked to the table, not just placed beside it.
<caption> is the preferred technique. It is native, visible by default, and read correctly by all common screen readers. If the table has no title, the criterion is not applicable — not non-compliant.
Un test to confirm that each data table has a title
Programmatic association of data table title
- Identify all data tables on the page that have a title (visible or announced by a screen reader).
- For each title, verify that it is conveyed to the table via one of these four techniques :
<caption>as the first child of<table>titleattribute on the<table>tagaria-labelattribute on the<table>tagaria-labelledbyattribute on<table>referencing theidof an existing element on the page
- All titles are associated via one of these techniques: test passed. At least one title exists visually without programmatic association (e.g., a
<p>or<h2>preceding the table withoutaria-labelledby): test failed.
Examples
❌ Non-compliant : Title in a paragraph not associated with the table
<p>Sales by region, Q3 2025</p>
<table>
<thead>
<tr>
<th scope="col">Region</th>
<th scope="col">Sales</th>
<th scope="col">Target</th>
</tr>
</thead>
<tbody>
<tr>
<td>North</td>
<td>142,000 €</td>
<td>130,000 €</td>
</tr>
</tbody>
</table>The title exists visually, but the table does not know it belongs to it. A screen reader will announce « table with 3 columns » without mentioning the title. A user who navigates from table to table has no context before starting to read cells.
✅ Compliant : Title associated with <caption>
<table>
<caption>Sales by region, Q3 2025</caption>
<thead>
<tr>
<th scope="col">Region</th>
<th scope="col">Sales</th>
<th scope="col">Target</th>
</tr>
</thead>
<tbody>
<tr>
<td>North</td>
<td>142,000 €</td>
<td>130,000 €</td>
</tr>
</tbody>
</table><caption> natively links the title to the table. The screen reader announces « Sales by region, Q3 2025, table with 3 columns » as soon as the user lands on it. No additional attributes required.
✅ Compliant : Title in a heading associated via aria-labelledby
<h2 id="titre-ventes">Sales by region, Q3 2025</h2>
<table aria-labelledby="titre-ventes">
<thead>
<tr>
<th scope="col">Region</th>
<th scope="col">Sales</th>
<th scope="col">Target</th>
</tr>
</thead>
<tbody>
<tr>
<td>North</td>
<td>142,000 €</td>
<td>130,000 €</td>
</tr>
</tbody>
</table>When layout requires a visible heading as a section title containing the table, aria-labelledby creates the programmatic association. The screen reader announces the same title. This technique is explicitly valid according to test 5.4.1.
Tips and pitfalls
⚠️ The <p> or <h2> before the table is not enough
This is the most common audit error: a visually correct title, but without a programmatic link to the table. A <p>Results Q3</p> followed by a <table> without aria-labelledby fails test 5.4.1. The screen reader does not guess the visual proximity.
⚠️ No title? Criterion not applicable
If a data table has no title, criterion 5.4 is not applicable (NA), not non-compliant. However, providing a title for each table remains a best practice: without it, screen readers often restate the first header row, which is rarely sufficient to identify the table during fast navigation.
💡 <caption> must be the first child of <table>
The HTML specification requires that <caption> be placed immediately after the opening <table> tag, before any <thead>, <tbody> or <tr>. A <caption> moved elsewhere in the structure is invalid and may not be rendered correctly by some screen readers.
⚠️ The title attribute on <table>: valid but invisible
RGAA accepts title on <table> as a valid technique. Unlike <caption>, this title is not displayed visually — only screen readers access it. If the title must be visible to all users, <caption> or aria-labelledby are much preferable.
⚠️ aria-labelledby silent when the id is missing
An aria-labelledby that points to a non-existent or misspelled id produces no visible error — it is simply ignored. The table ends up without a title announced, and the test fails without warning. Always verify that the target id exists in the DOM at render time.
Frequently asked questions
Why is a data table without a title non-compliant with RGAA?
It is not. Criterion 5.4 is conditional: it only applies if a title is present. A table without a title is marked NA (not applicable), not NC. It is criterion 5.3 that evaluates whether data tables have headers — a separate question.
When is a <h2> placed before the table sufficient as a valid RGAA title?
Yes, provided you add aria-labelledby on <table> with the value of the heading's id. Without it, the visual link does not exist programmatically and test 5.4.1 fails. With aria-labelledby correctly filled in, it is a valid technique according to RGAA.
How do you audit RGAA criterion 5.4 on data table titles?
Inspect each <table> in the developer tools: look for a <caption>, a title, a valid aria-label or aria-labelledby. With NVDA, navigate with the « T » key: the reader must announce an explicit title for each table that has one visually. If NVDA only announces the number of columns, the association is missing.
How do you hide <caption> with CSS while remaining RGAA compliant?
Accessible hiding (typical sr-only class with clip and position: absolute) remains valid: the title is announced by screen readers. A display: none or visibility: hidden hides the title from everyone, including assistive technologies, which invalidates the association and causes the test to fail.