Goal
- Allow technical aids to return the information contained in data tables in a comprehensible way, by informing users of the logical relationships between the table’s content and headers.
Implementation
Use the HTML th element and its scope attribute to tag header cells and explain their scope (scope of col value for a column header, of row value for a row header).
For headers that only apply to part of a row or column, check systematically for the idattribute, for the th element and the headers attribute for the td elements with the appropriate values:
- Give each header (thelement) an id attributeidattribute (for example,id="foo);
- Use the headersattribute in each cell (tdelement) to indicate the associated headers (for example,headers="foo"for each cell attached to the header having the attributeid="foo"). _ x000D__
To find out more:
Control
In the generated code of data tables:
- Check the systematic use of the thelement to tag row or column headers;
- For headers applying to the whole of a row or a column, check that the scopeattribute with the appropriate value (rowfor a row orcolfor a column) is systematically included;
- For headers which only apply to part of a row or column, check that the idattribute for thethelement and of theheadersattribute for thetdelements are systematically included with the appropriate values:
- Each header (th) element must have anid attribute(for example,id="foo");
- The headers attribute must be used in each cell (tdelement) to indicate the associated headers (for example,headers="foo"for each cell attached to the header having theid="foo"attribute).
Discover Opquast training and certification
The objective of these rules and the Opquast community mission is ‘making the web better’ for your customers and for everyone! Opquast rules cover the key major areas of risk that can negatively affect website users such as privacy, ecodesign, accessibility and security.
Opquast training has already allowed over 19,000 web professionals to have their skills certified. Train your teams, contact us
We offer a 1 hour free discovery module.