Skip to main content
RAWEBA

5.7 For each data table, is the appropriate technique used to associate each cell with its headers (excluding special cases)?

WCAG references
  • 1.3.1 Info and Relationships (A)
Techniques
  • F90
  • H43
  • H63

Official methodology to test criterion 5.7

Test 1 (5.7.1)

  1. Find the data tables in the document.
  2. For each header (<th> element) applying to the entire row or column, check that the <th> element has
    • either a unique id attribute;
    • or a scope attribute;
    • or a WAI-ARIA role="rowheader" or "columnheader" attribute.
  3. If this is the case for each header applying to the entire row or column, the test is validated.

Test 2 (5.7.2)

  1. Find the data tables in the document.
  2. For each header (<th> element) applying to the whole row or column and provided with a scope attribute, check that the scope attribute has
    • either a "row" value for row headers;
    • or a "col" value for column headers.
  3. If this is the case for each header which applies to the entire row or column and has an scope attribute, the test is validated.

Test 3 (5.7.3)

  1. Find the data tables in the document.
  2. For each header (<th> element) which does not apply to the whole row or column, check that the <th> element
    • has a unique id attribute;
    • does not have a scope attribute;
    • does not have a WAI-ARIA role="rowheader" or "columnheader" attribute.
  3. If this is the case for each header that does not apply to the entire row or column, the test is validated.

Test 4 (5.7.4)

  1. Find the data tables in the document.
  2. For each <td> or <th> element associated with one or more headers with an id attribute, check that
    • the <td> or <th> element has a headers attribute;
    • the headers attribute has the list of id attribute values for the associated headers.
  3. If this is the case for each <td> or <th> element associated with one or more headers with an id attribute, the test is validated.

Test 5 (5.7.5)

  1. Find the data tables in the document.
  2. For each header that applies to the entire row or column and has a WAI-ARIA role="rowheader" or "columnheader" attribute, check that the element has
    • either a WAI-ARIA role="rowheader" attribute for row headers;
    • or a WAI-ARIA role="columnheader" attribute for column headers.
  3. If this is the case for each header that applies to the entire row or column and has a WAI-ARIA role="rowheader" or "columnheader" attribute, the test is validated.

Test 6 (5.7.6)

  1. Find the data tables in the document.
  2. For each header (<th> element) applying to a group of rows or a group of columns and provided with a scope attribute, check that the scope attribute has
    • either a rowgroup value for row header groups;
    • or a colgroup value for column header groups.
  3. If this is the case for each header applying to a row group or column group and provided with a scope attribute, the test is validated.