Open CJE001 opened 4 days ago
Guideline 1.3: Adaptable _"Create content that can be presented in different ways (for example, simpler layout) without losing information or structure."
1.3.1 Info and Relationships WCAG 2.0 Level A
Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text. The most appropriate semantic mark-up must be used in the source code of websites to describe the role and relationship between different elements on pages, such as headings, paragraphs, lists, forms and tables. This will ensure that assistive technologies such as screen readers correctly interpret and convey the page structure.
Summary
Via Vision Australia assessment: August 2024
Impact: medium
Note: DTA have a 90 day remediation period to address the identified issues within the audit, all issues must be resolved to obtain WCAG 2.2 certification for digital.gov.au.
Steps to reproduce
Risk assessment for use of AI | digital.gov.au (https://www.digital.gov.au/policy/ai/risk-assessment)
Observed outcome
The complex "Risk Matrix" table contains two-tiered headings that span multiple rows and columns; however, it does not contain the required markup to programmatically associate each header with the corresponding cells. Additionally, the row headers have not been marked up semantically in the code as headers.
Furthermore, the table contains empty table header (
<th>
) elements.Code used
Why this matters
When complex tables (tables that contain more than three header cells associated with each data cell, have multi-tiered headers, or whose column header changes within the table) do not explicitly define the relationship between header and cell data, it may be impossible for screen readers to convey the correct relationships to users.
Expected outcome
Mark up the cells that function as the row headers as
<th>
elements.Ensure that each data cell in the table is programmatically associated with its corresponding header cells. This can be achieved by adding a unique id attribute to each
<th>
element, and adding the headers attribute to each<td>
element that references the id attribute values of each associated<th>
element. Each<th>
element in the second row or column should have a headers attribute that references the id attribute of the first header row or column (spanned row/column).Additionally, replace the empty
<th>
elements with<td>
elements.Code example
Note
For further information on complex tables, please refer to the W3C guidance on Tables with Multi-Level Headers and Tables with Irregular Headers.
Related issues
For other issues related to this component, please refer to:
• Issue 15 – Loss of table content when text resized • Issue 19 – Table breaks when site reflowed