Status
Inline alert
An inline alert is a short message in the flow of a page, next to what it is about, that says something is late, done, worth knowing or broken, and stays until that changes.
Designed, coming to kanso-ui
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 takesrole="alert". One that is there when the page loads needs no role. - Text uses the
on-…-softcolours:on-caution-soft9.5:1 in light and 10.0:1 in dark,on-positive-soft10.9:1 and 10.3:1,on-accent-soft9.5:1 and 9.6:1,on-critical-soft10.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.
cautiononcaution-softholds 4.0:1 in light and 7.6:1 in dark;criticaloncritical-soft5.2:1 and 8.6:1 (computed from the tokens). The words stay in the darkon-…-softcolour, becausecautionas 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.