Skip to main content
Version: v6

An Image ARIA Role is missing required aria attributes

An Image ARIA Role is missing required aria attributes — rule summary
FieldValue
Rule codeImg_AttributeRequirement_Missing
WCAG conformance levelA
WCAG success criterion4.1.2 Name, Role, Value
Must be fixed at sourceNo

Description

The Image ARIA Roles must include an aria-label or aria-labelledby ARIA attributes to be fully accessible to assistive technologies. For the HTML <img> element, use the alt attribute. For all other elements with the img role, use aria-labelledby if a visible label is present, otherwise use aria-label. Missing prop 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/#img.

How to fix

Ensure every element with role='img' has an 'aria-label' if no visual label exists (e.g., <div role='img' aria-label='Descriptive text'></div>), or an 'aria-labelledby' if a visible label is present (e.g., <div role='img' aria-labelledby='labelID'></div> with a corresponding <label id='labelID'>Visible Label</label>).