-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Improve Notification colour contrast (a11y) #446
Comments
IMO, they look great! It really improves the readability of the notifications 👍 |
Great proposal @m10l ✨ I've got couple of comments:
Questions
|
I see that Github has the icon vertically centered in their Toast component. Look at others to get inspired not to prove a point! :) But, nevertheless, I still think it should be aligned to the top. |
@domarku Awesome, thanks for the review and suggestions
Cool, I think this is worth tackling at the same time too so will do this as part of the same PR
The examples linked all have a solid background for the entire notification, so I think your suggestion makes sense there, but doesn't work for what we're doing as it's a smaller section with a solid colour background.
Ah good spot, was using TextLink but the wrong colour.
Cool, think text is already prevented from going beneath the close button, but I'll test it to make sure.
It's always at the bottom Could we rename the component to Message or Toast or would that be a breaking change?
Ooo, definitely, good shout. |
Right on @m10l! Thanks for addressing all my comments. Any chance you would consider putting the CTA inline in case of no body text? Like so: |
@domarku Still not in favour of doing this, I think introduces more potential problems than it tries to solve. Pros/cons
|
Ah, good points. Although that makes me think we should have come copy guidelines for the notifications. I'll give it a go at writing and adding them to the thread later in the day. |
@domarku That'd be awesome! Shall I close this an open a PR? |
Do it 🤠 |
looks really good! now if you compare the old notification to it, the old one look super outdated and wrong so 100x for the proposal |
Closing as PR created here: #449 |
The problem
The Notification component currently fail WCAG colour contrast accessibility guidelines:
Notification with
success
intent:Notification with
warning
intent:The proposed solution
I'd like to propose some changes to these components to make sure we can consistently meet accessibility guidelines by not setting text on a solid-colour background.
Here are some mockups of what I'd like to implement:
Success
![Screenshot 2020-03-30 at 15 03 25](https://user-images.githubusercontent.com/4446634/77915740-42d3e580-7298-11ea-8c91-44672dcc6ef5.png)
Warning
![Screenshot 2020-03-30 at 15 01 35](https://user-images.githubusercontent.com/4446634/77915750-48313000-7298-11ea-8096-6e207d9603be.png)
Error
![Screenshot 2020-03-30 at 15 01 17](https://user-images.githubusercontent.com/4446634/77915756-4cf5e400-7298-11ea-9746-deaa7ef25c6a.png)
The text was updated successfully, but these errors were encountered: