AvatarGroup accessibility
WCAG 2.1 AA requirements
Semantics
- The group container has
role="group"and anaria-labeldescribing the count (e.g., "Group of 5 avatars"). - Each avatar inside the group retains its own accessible name from
AvatarFallbackorAvatarImagealt text.
Overflow badge
- The "+N" overflow badge has an
aria-label(e.g., "3 more") so screen readers announce the count. - Ensure the overflow text has 4.5:1 contrast against its background.
Keyboard
- AvatarGroup is non-interactive by default. If you make individual avatars clickable, ensure each one is focusable with a visible focus ring.
Audit checklist
- Group has
role="group"andaria-label - Each avatar has accessible text (alt or fallback initials)
- Overflow badge has
aria-labelwith the count - 4.5:1 contrast on overflow badge text