sl-design-system / components

SL Design System
https://sanomalearning.design/
Apache License 2.0
45 stars 4 forks source link

Notification pattern #138

Open jpzwarte opened 1 year ago

jpzwarte commented 1 year ago

Create a new snack bar web component.

This component is for displaying "notifications" inside the web application. Some examples:

Other implementations:

Requirements:

Diaan commented 1 year ago

https://loihdefactor.com/fi/2022/04/29/building-testing-tools-for-aria-live-regions https://aerotwist.com/blog/flip-your-animations/

furstenberg commented 1 year ago

I believe this to be the most important resources on an accessible Toast:

This quote regarding accessibility is worth noting:

Few (none that I have found so far) of the existing toast or toast-like notification patterns in the wild will pass a WCAG audit. Instead of reviewing each of the ~50 examples, I am going to break down some of the broader concepts and risks that you can bear in mind when writing your own toast-like notification or reviewing one to use in your project.

And 2.2.1: Timing adjustable is the reason itslearning we stopped suggesting to have a Toast component in our Component Library.

Diaan commented 1 year ago

Thanks for these links @furstenberg Really interesting!

https://adamsilver.io/blog/the-problem-with-snackbars-and-toast-messages/

furstenberg commented 1 year ago

I have many more related to the other components that are going to be made, so let me know if they are of interest.

Itslearning have spent quite some time on accessible components.

Diaan commented 1 year ago

@furstenberg Of course we're interested in your expertise! Feel free to keep commenting on issues and certainly join in the discussions: https://github.com/sanomalearning/design-system/discussions

We will keep doing our research before each component we make so if we have specific questions regarding an interaction we'll get in touch!

Diaan commented 1 year ago

📝 put back on backlog until we've figured out how (if) we should make this in an accessible way

Diaan commented 8 months ago

Research done:

If you find yourself saying, Hey, if my screen reader, zoom, or keyboard-only users miss some of these messages, it’s not a big deal then you have a larger question to ask — do you even need those messages?

Researching how to build an accessible snack bar/ toast component we found rather a lot of comments and articles about the problems of making it accessible. Some of the recommendations also seemed to contradict each other.

Biggest downsides

Possible alternatives to toast messages

Challenge This discussion is an attempt to find accessible solutions for all scenarios in which we would (without thinking about accessibility) use a toast message.

Articles and resources