A long message wraps onto the next line, so none of it is cut off. The last toast closes itself after three seconds.
Content
Say what happened in a few words: “Threshold saved”.
Name the logger or site when it matters which one.
Use sentence case, with no full stop.
Keep it short enough to read at a glance.
Don’t use it
Auto-closing an error. People need time to read it.
Stacking more than three at once.
Accessibility
Error and warning toasts use role="alert", which interrupts a screen reader, and the others use role="status". Set role to override this. Auto-close pauses while the pointer is over the toast or focus is inside it.
Key
What it does
Tab
Moves focus to the cross, announced as “Close”.
Enter / Space
Closes the toast and moves focus to the next control.