Rule n° 243 - Captions for data tables are provided
An HTML table can be equipped with one. This can be displayed or not, but in any case, its presence and relevance are important for understanding the table.
Goal
- Allow users of technical aids (like screen readers) to easily identify the nature of the information provided in a table.
Solution technique
Use and fill in the HTML caption element for each data table.
If necessary, use a caption element hidden from the display.
Find out more:
Moyen de contrôle
For each data table:
- Check the presence of the
captionelement. If this element is hidden from view using a CSS class, check that it remains accessible to screen readers; - Check the relevance of the
captionelement which should make it possible to identify the kind of information provided by the table.
This check can be partially automated to check that the caption title element is there, but checking its relevance must be done manually.