On this page

Badge

What Badge gives you and what your team does.

Conformance

Badge meets WCAG 2.2 level AA when used as described on these pages.

Keyboard

A badge is not interactive and takes no focus.

What Badge gives you

  • The status is text, so screen readers read it where it sits.
  • Status text on the page and on its tints is at least 4.5:1 (D25); text on a solid state label meets the contrast check for text.on-bold.
  • The word carries the status; the outline and colour only support it.

What your team does

  • Write the status in words; never a coloured badge with no text.
  • On a state label, add an icon that matches the status, with aria-hidden="true".
  • When the badge sits apart from what it describes (for example in a card header), make sure the order in the page reads well: “Online store to ERP, Synced”.
  • Use the same word for the same status everywhere.
  • If a status changes while people watch (Syncing to Synced), announce it in a live region elsewhere on the page; the badge itself does not.

WCAG criteria

Criterion Level How
1.3.1 Info and Relationships A The status is text next to what it describes
1.4.1 Use of Color A Every badge has a word; state labels also an icon
1.4.3 Contrast (Minimum) AA At least 4.5:1 (D25)
4.1.3 Status Messages AA Your team announces live changes