a11y-theme-builder
a11y-theme-builder copied to clipboard
[TB] Molecules - Image - Images missing alt text
Problem/Concern
Images are missing alt text, causing Accessibility Insights for Web errors
Issue
Ensures <img> elements have alternate text or a role of none or presentation
(image-alt)
Target application
Element path
.image-sq > img
Snippet
<img src="/sample.jpg">
How to fix
Fix any of the following:
Element does not have an alt attribute
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute
Element's default semantics were not overridden with role="none" or role="presentation"
Environment
Microsoft Edge version 126.0.0.0 This accessibility issue was found using Accessibility Insights for Web 2.43.0 (axe-core 4.8.4), a tool that helps find and fix accessibility issues. Get more information & download this tool at http://aka.ms/AccessibilityInsights.
Screenshot
Proposed Solution
If images are meaningful, add alt text. If not, add empty alt text.