Elements with role='img' must have an accessible name

text-alternatives/role-img-alt · WCAG 1.1.1 · Level A

Elements with role='img' must have an accessible name.

When you assign role='img' to an element (like a div containing icon fonts or CSS backgrounds), you must provide an accessible name via aria-label or aria-labelledby. Without this, screen reader users have no way to understand what the image represents. If the image is decorative, use role='presentation' or role='none' instead.

Scan a page or repo for issues like this · All rules

Introduced in @accesslint/core v0.8.0