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 styles to meet WCAG 2.1 level AA non-text contrast requirements #360
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
.autocomplete__hint, | ||
.autocomplete__input { | ||
-webkit-appearance: none; | ||
border: 2px solid; | ||
border: 2px solid #0b0c0c; | ||
border-radius: 0; /* Safari 10 on iOS adds implicit border rounding. */ | ||
box-sizing: border-box; | ||
-moz-box-sizing: border-box; | ||
|
@@ -20,17 +20,17 @@ | |
} | ||
|
||
.autocomplete__hint { | ||
color: #BFC1C3; | ||
color: #b1b4b6; | ||
position: absolute; | ||
} | ||
|
||
.autocomplete__input--default{ | ||
padding: 4px; | ||
.autocomplete__input--default { | ||
padding: 5px; | ||
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. Should the autocomplete have a 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. I've tried not to change that since this component relies on layering of inputs (placeholder, typeahead hint) and overlays for some features and it felt risky to change, so wanted to do a simple update and maybe do something better if we decide to do the stuff Dave was proposing in the other PR. 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. I'd do it 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. This pull request isn't meant to be making the component 'proper GOV.UK Frontend' so would be nice to get this in and improve it later in the way Dave has suggested, will see what Ollie thinks 😬 |
||
} | ||
|
||
.autocomplete__input--focused { | ||
outline: 3px solid #fd0; | ||
outline-offset: 0; | ||
outline: 3px solid #ffbf47; | ||
box-shadow: inset 0 0 0 2px; | ||
} | ||
|
||
.autocomplete__input--show-all-values { | ||
|
@@ -52,7 +52,7 @@ | |
background-color: #fff; | ||
border: 2px solid #0B0C0C; | ||
border-top: 0; | ||
color: #34384B; | ||
color: #0B0C0C; | ||
margin: 0; | ||
max-height: 342px; | ||
overflow-x: hidden; | ||
|
@@ -82,7 +82,7 @@ | |
} | ||
|
||
.autocomplete__option { | ||
border-bottom: solid #BFC1C3; | ||
border-bottom: solid #b1b4b6; | ||
border-width: 1px 0; | ||
cursor: pointer; | ||
display: block; | ||
|
@@ -107,8 +107,8 @@ | |
|
||
.autocomplete__option--focused, | ||
.autocomplete__option:hover { | ||
background-color: #005EA5; | ||
border-color: #005EA5; | ||
background-color: #1d70b8; | ||
border-color: #1d70b8; | ||
color: white; | ||
outline: none; | ||
} | ||
|
@@ -128,7 +128,7 @@ | |
|
||
.autocomplete__hint, | ||
.autocomplete__option { | ||
padding: 4px; | ||
padding: 5px; | ||
} | ||
|
||
@media (min-width: 641px) { | ||
|
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.
I'll use this as the basis for discussion with Mark when we put together the final release notes.