a11y-theme-builder icon indicating copy to clipboard operation
a11y-theme-builder copied to clipboard

[TB] Molecules - Image - Images missing alt text

Open kburk1997 opened this issue 7 months ago • 1 comments

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

A11y ThemeBuilder

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

Screenshot of three images without alt text on Images page highlighted

Proposed Solution

If images are meaningful, add alt text. If not, add empty alt text.

kburk1997 avatar Jul 02 '24 20:07 kburk1997