Use toasts to show a confirmation of non-critical actions from the user. For example, you might show a toast to inform the user that their recent action of saving an item to the workspace was successful.
- Use for short messages to confirm an action as feedback to the user. For example, you might show a toast message to inform a user that their recent action was successful
- Toasts should be concise, scannable and informative—users shouldn't need to spend a lot of time figuring out which action they just took and where they could go next (e.g., iew in workspace)
- States: Can be used specifically for success and error messages
- Display toasts one at a time, the newest toasts should appear above the most recently displayed toasts
- Toasts should always be dismissible (the "x" in the top right corner)
- Use appropriate punctuation; each message should end in a "."
- Not to be used for marketing information or in-app feature messages
- Not to be used for system errors, outages, etc. Use an alert or banner for these needs.
Toast messages are simple, concise and human-sounding. The message informs the user of the outcome of an action.
They should be written in a noun + verb form.
"The item (noun) was saved (verb) to Martin Luther King Research"
Toast messages should be human sounding, and not as system-centric:
"The item was saved to Martin Luther King Research."
"Item saved to Martin Luther King Research."
Avoid unnecessary terms, for example, don't use "successfully" in banners that confirm an action has been completed, the success toast variant will suffice.
When a user experiences an error, it should include an actionable step that the user can take on their own or seek help from support.
3.2.4 Consistent Identification 1.4.13 Content on Hover or Focus AA
Allows the user to receive a quick notification
- Toast notification should always appear in the same location on the screen
Notifications should appear for at least 5 seconds
- This time should be increased by 1 second for every 120 words
- Toasts should be wrapped in aria-live-region and have
role="alert", having both maximizes cross-browser compatibility and assistive technology pairings - When focus is on the toast, pause the timer
Reads the notification as soon as it appears on screen
Toast gets added into the focus order.
When toast is open, the first tab goes to first the first intractable element in the toast notification
After it is closed, focus will be placed on the element after the one that triggered the toast