Language: EN

Elements with role="img" lack a text alternative

Message shown by axe and Lighthouse: [role="img"] and [role="image"] elements must have alternative text · role-img-alt · WCAG 1.1.1

What it means and why it matters

Assistive technology can't describe these graphics (WCAG 1.1.1).

How to fix it

Provide aria-label or aria-labelledby, or remove the role if the element is decorative.

Code example

Before

<div role="img" class="rating-stars"></div>

After

<div role="img" class="rating-stars" aria-label="Rated 4 out of 5"></div>

Find this error on your website

Run a free check of any page — results in seconds, with fix instructions.

Check a page for free

All accessibility errors

Order a paid plan

Leave your email and we'll contact you as soon as the plan can be ordered.