Accessibility

  • Icons are aria-hidden="true"; the lead carries the meaning.
  • An alert added after the page loads takes role="status"; a critical one that needs action now takes role="alert". One that is there when the page loads needs no role.
  • Text uses the on-…-soft colours: on-caution-soft 9.5:1 in light and 10.0:1 in dark, on-positive-soft 10.9:1 and 10.3:1, on-accent-soft 9.5:1 and 9.6:1, on-critical-soft 10.7:1 and 11.0:1.
  • Why the icon can be the bright colour: an icon is a graphic, so WCAG 1.4.11 asks 3:1, not the 4.5:1 of text. caution on caution-soft holds 4.0:1 in light and 7.6:1 in dark; critical on critical-soft 5.2:1 and 8.6:1 (computed from the tokens). The words stay in the dark on-…-soft colour, because caution as text on its soft fill would fall under 4.5:1. The positive and info icons take the text colour.
  • The action is a real button: k-btn--sm (32 px) on the web, 48 px on phones, with the focus ring.