Accessibility
toast, Toaster, ToastPosition, ToastSeverity from @prepared911/ui/toast.
label and a polite live region. A routine toast (default, info, success, warning) is announced when it is added.role="alert" element, so it is announced assertively. Politeness follows severity and is not a prop. Some assistive technology may read an error toast twice, once from each live region.Alt+T moves focus to the newest toast, Tab reaches its action and close button, and focus inside the stack spreads it out the way hover does so a toast stacked behind the newest is visible when focus lands on it. A toast past visibleToasts is never shown, so it is inert: it leaves the tab order and the accessibility tree as soon as sonner marks it, with or without motion, and Escape on a focused toast dismisses it and returns focus to where it was. The Escape does not reach a dialog that hosts the stack.prefers-reduced-motion sonner removes all of them, so a toast appears and leaves in place. The text state fade in the body uses --motion-glide-state.CanvasText border and drops its shadow. The severity is carried by the icon's shape, not only its color.:focus-visible.