About This Accessibility Rule
Ensures that components with the label role="img" have an alternate text.
Even if an image merely contains text, screen readers are unable to convert it into words that the user can hear. As a result, alternative language for images must be brief, descriptive, and easily understandable so that screen reader users may understand the image’s contents and intended application.
Without an accessible text alternative that screen readers can translate into sound or braille, all visual information, including images, is utterly useless if you can’t see. Accessible alternate text is also necessary to variable degrees for people with low vision or color blindness problems.
If an image does not have a text alternative that is accessible, screen readers cannot translate the information in the image to voice or braille.
What this Accessibility Rule Checks
Elements with the property value role="img" must additionally have markup that specifies accessible alternative text for the image.
Learn more:
- → Deque University - How To Fix
- → WCAG 2.1 - Failure of Success Criterion 1.1.1 due to omitting the alt attribute or text alternative on img elements, area elements, and input elements of type 'image'
- → WCAG 2.1 - Using alt attributes on img elements
- → WCAG 2.1 - Using null alt text and no title attribute on img elements
- → WCAG 2.1 - Using aria-labelledby to provide a text alternative for non-text content
Detect accessibility issues automatically
Rocket Validator scans thousands of pages with Axe Core and the W3C Validator, finding accessibility issues across your entire site.