Accy

Meaningful SVG icon with no name

WCAG 1.1.1 (A) · EN 301 549 9.1.1.1

There is an SVG marked as an image (role="img") or otherwise meant to have a name, but with no accessible name.

Why it matters

An SVG that conveys information and has no name is invisible to a screen reader. Purely decorative icons are not the problem; the problem is the icon that does mean something, like the secure-payment padlock or the "sustainably made" mark.

How to fix it

If the icon carries information, add a <title> inside the SVG or an aria-label. If it is decorative, mark it aria-hidden="true" and make sure the visible text already says what is needed.

As it is
<svg role="img" viewBox="0 0 24 24"><path d="…"/></svg>
As it should be
<svg role="img" aria-label="Secure payment" viewBox="0 0 24 24"><path d="…"/></svg>

<!-- Decorative, next to text that already explains it -->
<svg aria-hidden="true" viewBox="0 0 24 24"><path d="…"/></svg> Free shipping

Related

Does your shop have this failure?

Check for free, along with the other 54 rules. No sign-up.

No sign-up. We scan one public page and store nothing about you.