Meanwhile, GitHub is removing Toasts from Primer, their design system.[1] They’re next to impossible to implement in a way that retains accessibility across all needs, and if you try to restrict their usage to places where accessibility doesn’t matter so much (simple ephemeral confirmations) people misuse them anyway.
It’s notable that accessibility isn’t mentioned once in this post, or, in fact, in the component’s documentation.
I think it would be accurate for GitHub to say, "GitHub no longer uses toasts because we didn't want to make the effort to make them accessible or usable."
Spectrum’s Toast docs don’t mention how they make Toasts accessible with screen magnifiers (more widely used than screen readers based on the last WebAIM surveys I saw), so I guess they didn’t consider them?
Everyone knows accessibility is just throwing aria tags at any element you see. The more aria tags there are, the more accessible it must be, right? /s
I think that toasts are kind of an attractive nuisance when it comes to accessibility.
They can technically, with ample constraints and a great deal of restraint, maybe end up complying with WCAG, etc., but all it takes is one developer saying "well a toast is easy" or "this isn't that important, make it auto-dismiss" and you're back in bad pattern town.
You see this with government web design systems - they have a very limited and constrained palette of patterns, because it allows for more consistency and reliable accessibility, versus having a bunch of tools that you just generally shouldn't use.
(The GitHub page linked above also makes a great case for how "making toasts accessible" isn't as simple as just having the right aria roles - lots of details the Adobe design doesn't seem to completely cover, unfortunately)
GitHub is also limiting the new PR review page to only show 40 comments from reviewers. Who knows which 40. If you want to see more, they have a banner that tells you to switch back to the legacy view. No idea if they'll just silently lose the feature of "seeing all your PR's comments" once the legacy view is discontinued.
So I wouldn't take any inferences from their design system as gospel.
I’m the design leader for an enterprise software company and would love to get rid of toasts. Places where feedback is immediate don’t need them and simple forms can probably be fine with a banner or alert.
Reasons that toasts are difficult to get rid of:
- Easy for developers to implement consistently.
- Providing feedback where actions are taken on elements not on the screen (like bulk actions on a data grid, or within our workflow).
- Dense UIs where actions are taken frequently and injecting an alert or banner to be dismissed adds a ton of work for users. Also, causing the UI to jump isn’t great.
I quite like the technique of adding a kind of "microtoast" right next to the element that's just been clicked/updated. So you'd click a button, and then directly above or below the button (or even on the button, depending on the notification), you add a bit of text saying the action has been completed. That disappears after a short delay, just like a toast. It's still got some of the accessibility issues that always come with popping up random elements in the UI, but at least it is directly next to where the user is interacting, so they can easily see that what they've done was successful, or failed, or whatever.
This works well for the last category, because it provides feedback but it doesn't need to be dismissed. But it also typically needs to be implemented afresh in each place it's used, which means more fiddly developer work.
All that says, I've lost this battle plenty of times and a lot of the stuff I've worked on ends up getting toasts in the end because they're just so much easier to implement than anything else.
Not too hopeful with accessibility, as it isn't pleasant to use at all with reduced motion enabled. They flicker when added and linger around when swiped away.
GitHub seems to suggest banners or “Also consider ways to notify the user in other communication channels such as email, notifications, or a push notification in the GitHub app.”
On MacOS… emails and push notifications create… toast messages
It’s notable that accessibility isn’t mentioned once in this post, or, in fact, in the component’s documentation.
[1] https://primer.style/accessibility/toasts/