Feedback
Snackbar
A snackbar is a brief message near the bottom of the screen that confirms what the person just did and, at most, offers one way to undo it.
In kanso-ui as Snackbar
Accessibility
- Write the message into a live region that is already on the page (
role="status"), so screen readers announce it without moving focus. - Never move focus to the snackbar. Undo must also be reachable without it: in the item's menu, or with Ctrl+Z (⌘Z).
- While a screen reader is running, a snackbar with an action stays until it is closed. Escape closes it when focus is inside.
- Contrast:
on-inkoninkis 16.7:1 in light and 15.9:1 in dark; theaccent-on-inkaction 8.4:1 and 6.5:1. The focus ring on ink isaccent-on-inktoo: the usualaccentring falls to 2.3:1 and 1.8:1 there (computed from the tokens). - Its buttons are 36 px, above the 32 px web minimum; on phones give them a 48 px hit area, the full height of the bar.