-
Notifications
You must be signed in to change notification settings - Fork 2.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
Update focus outline color to meet WCAG 2.2 contrast standards #6854
Changes from 2 commits
296e279
504f6ac
e1c68a9
5e0e36d
81a43f3
317b266
86e5aa2
1e467c0
96f6834
e991afe
4236fe4
3350734
5295e85
3bbb737
bff3105
d2f00e7
e51c4d1
79682a8
a6274d1
f55fad6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,11 @@ $pt-app-elevated-background-color: $light-gray4 !default; | |
$pt-dark-app-elevated-background-color: $dark-gray3 !default; | ||
|
||
$pt-outline-color: rgba($blue3, 0.6) !default; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not changing this color because of the comment at the top of this file stating that is generally considered a breaking change. Perhaps we want to make an exception here... |
||
// 0.752 opacity to meet WCCAG 2.2 minimum contrast guidelines with all light-gray backgrounds in light theme | ||
// and all dark-gray backgrounds in dark theme | ||
$pt-focus-indicator-color: rgba($blue2, 0.752) !default; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. $blue2 on $white - 3.77:1 contrast |
||
// between $blue4 and $blue5 | ||
$pt-dark-focus-indicator-color: rgba(#7BB0FB, 0.752) !default; | ||
|
||
$pt-text-color: $dark-gray1 !default; | ||
$pt-text-color-muted: $gray1 !default; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,7 +197,7 @@ $control-indicator-spacing: $pt-grid-size !default; | |
|
||
input:focus ~ .#{$ns}-control-indicator { | ||
@include focus-outline(); | ||
outline: $blue3 solid 2px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. from what I can tell this was just to provide increased contrast, no reason to not use the consistent |
||
outline: $blue3 solid 2px; // remove this line for bp6 for a consistent focus outline style | ||
evansjohnson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
// right-aligned indicator is glued to the right side of the container | ||
|
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.
colors have changed - but not the method of how the focus indicator is applied (2px offset 2px outline) so I expect minimal chance of breaking changes