On this page

Avatar

What Avatar gives you and what your team does.

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 the alt you 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.text on color.background.neutral, at least 7:1 in both themes (Color › Usage: avatar with initials).

What your team does

  • Give AvatarImage an alt with the person’s name, or alt="" when the name is written next to the avatar.
  • Write the status in the AvatarBadge slot. Where people need it, also show it as text next to the name.
  • Give an AvatarGroup role="group" and an aria-label that 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