Conformance
Avatar meets WCAG 2.2 level AA when used as described on these pages. It is an image of a person, so the rules for non-text content apply.
Keyboard
An avatar is not interactive and takes no focus. When it opens something, it sits inside a button or a link that does.
What Avatar gives you
- The photo is an
<img>with thealtyou give it; the initials show in its place until it loads or when it fails. - The status dot’s words are in the page, visually hidden, so screen readers read the status.
- Initials:
color.textoncolor.background.neutral, at least 7:1 in both themes (Color › Usage: avatar with initials).
What your team does
- Give
AvatarImageanaltwith the person’s name, oralt=""when the name is written next to the avatar. - Write the status in the
AvatarBadgeslot. Where people need it, also show it as text next to the name. - Give an
AvatarGrouprole="group"and anaria-labelthat says who it shows and how many. - Don’t make an avatar clickable on its own; wrap it in a button or link with a name.
WCAG criteria
| Criterion | Level | How |
|---|---|---|
| 1.1.1 Non-text Content | A | alt on the photo; the status in words |
| 1.4.1 Use of Color | A | The status dot’s meaning is also in text |
| 1.4.3 Contrast (Minimum) | AA | Initials at least 7:1 |
| 1.4.11 Non-text Contrast | AA | The dot sits on a ring of the surface colour, so it stays apart from the photo |