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 id
attribute, for the th
element and the headers
attribute for the td
elements with the appropriate values:
- Give each header (
th
element) an id attributeid
attribute (for example,id="foo
); - Use the
headers
attribute in each cell (td
element) 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
th
element to tag row or column headers; - For headers applying to the whole of a row or a column, check that the
scope
attribute with the appropriate value (row
for a row orcol
for a column) is systematically included; - For headers which only apply to part of a row or column, check that the
id
attribute for theth
element and of theheaders
attribute for thetd
elements 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 (
td
element) 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.