An Aria Role Heading is missing required aria attributes
| Field | Value |
|---|---|
| Rule code | Heading_AttributeRequirement_Missing |
| WCAG conformance level | A |
| WCAG success criterion | 4.1.2 Name, Role, Value |
| Must be fixed at source | No |
Description
Heading ARIA Roles must include the aria-level ARIA attributes to be fully accessible to assistive technologies. Missing the aria-level attribute and value on a Heading role can lead to incomplete or incorrect interpretation of the heading. More details on ARIA role requirements are available here: https://www.w3.org/TR/wai-aria-1.1/#heading.
How to fix
To resolve this issue, ensure that each element with a role of 'heading' has the 'aria-level' attribute. The 'aria-level' attribute should specify the heading level, such as '1' for a primary heading, '2' for a secondary heading, and so on. This value must correspond to the visual and structural level of the heading within the content hierarchy. For example, an element with role='heading' representing an h1-level heading should have 'aria-level="1"'. This will ensure that screen readers and other assistive technologies can accurately interpret the heading's importance within the content.