Accessibility

  • A badge is text: no role, no tab stop. Put it after the title it describes, so it is read in that order.
  • The words carry the meaning; the colour and the aria-hidden icon repeat it.
  • A count needs words for screen readers: 3<span class="k-sr"> left</span>.
  • A badge is not a live region; the action that changed it gives the feedback, such as a snackbar.
  • Contrast, light / dark: ink on container 14.3 / 12.0:1; on-accent on accent 7.6 / 7.7:1; on-accent-soft 9.5 / 9.6:1; on-positive-soft 10.9 / 10.3:1; on-caution-soft 9.5 / 10.0:1; on-negative-soft 10.8 / 11.2:1; on-critical-soft 10.7 / 11.0:1; on-ink on ink 16.7 / 15.9:1.
  • Motion: none.