-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Primer CSS a11y #1116
Primer CSS a11y #1116
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/primer/primer-css/8elhoc1su |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love your solution for the changes graph! <3
@@ -29,6 +29,8 @@ | |||
&:focus { | |||
text-decoration: none; | |||
border-bottom-color: $border-gray-dark; | |||
outline: 1px dotted transparent; // Support Firfox custom colors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simurai doesn't adding outline-color: transparent
to the :focus
state break accessibility in all other browsers or when users don't use custom colors?
A few more accessibility improvements to the component refresh before releasing it as Primer CSS
15.0.0
.1. Increase contrast for
$text-green
green-500
green-600
#28a745
#22863a
3.13
❌4.63
✅2. Increase contrast for placeholders
Overriding the
opacity: 0.54
toopacity: 1
will make sure the$text-gray-light
is opaque and the contrast ratio should now be4.82
(recommendation is4.5
). Improves https://github.com/github/github/issues/1318942.06
❌4.82
✅3. More accessible
.Progress
componentThis makes sure the
.Progress
bar is visible when enabling custom colors in Firefox. Improves https://github.com/github/github/issues/131895. The transparent outline/border won't be visible by default. But when custom colors are enabled in Firefox, it will make the outline/border the same color as the text color. And they magically appear. ✨4. More accessible
.State
componentSame as above ☝️ .
5. More accessible
.Counter
componentSame as above ☝️ .
6. More accessible
.diffstat
componentSame as above ☝️ .
7. More accessible
.btn
component when focusedSame as above ☝️ . Improves https://github.com/github/github/issues/131885
8. More accessible
.UnderlineNav
componentSame as above ☝️ .