Potential A11y Violation:
Missing element alt attribute
Point of Failure
The alt
attribute should not be missing on <img>
elements, <area>
elements, <object>
elements, <input type="image"/>
elements, or elements with the role
of img (such as <svg>
).
Available Automation Evaluation
In checking known available linting and testing tools, these are our findings.
Automation exists for this WCAG violation, so that's super helpful for us!
Linting Exists
These are the available linting rules for this violation:
- axe Accessibility Linter: image-alt (VS Code extension)
- Ember: require-valid-alt-text
- Lit: alt-text (lit)
- React/JSX: alt-text (jsx)
Testing Exists
The axe-core testing library offers several separate rules to support testing for this WCAG violation:
Manual Test Existsing
If you are able to use the linting and testing libraries mentioned here, then you will need to manually test for this point of failure. Inspect the DOM, checking for the elements listed in the point of failure, and ensure that each have an alt
attribute.