Skip to content

Find what you need, instantly

Search components, ARIA roles & attributes, and WCAG criteria.

All roles

img

Document structure role

A container of one or more elements that assistive technologies should treat as a single image with one accessible name. It's useful when an image is actually built from text, emoji, or several graphics. Give it a name via aria-label or aria-labelledby, and hide its inner parts.

Used on
A container treated as a single image. Prefer <img>.
Accessible name
Required, via alt, aria-labelledby, or aria-label.
Example
role="img"
<div role="img" aria-label="4 out of 5 stars">★★★★☆</div>