Accessible Tables
Checks if data tables use headers (<th>) and captions.
What is this check?
This check looks at `<table>` elements to see if they are structured accessibly. This includes using `<th>` for column and row headers, and `<caption>` to provide a summary of the table's content.
Why is it important?
For screen reader users, a properly structured table allows them to navigate the data cell by cell and understand the relationship between the data and its corresponding headers.
What is the impact?
Without proper headers, a data table is just a confusing jumble of cells for a screen reader user.
Example Implementation
<table border="1">
<caption>Monthly Sales Report</caption>
<thead>
<tr>
<th scope="col">Month</th>
<th scope="col">Sales</th>
</tr>
</thead>
<tbody>
<tr>
<td>January</td>
<td>$10,000</td>
</tr>
</tbody>
</table>