Update focus style on Error Summary and Notification Banner #3870
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Applies the same
govuk-focused-box
mixin used for images in #3819 to the Error Summary and Notification Banner components, as per @davidc-gds's suggestion.Merging this would be one way to resolve #1936, as it fixes the problem of the yellow outline not providing sufficient contrast.
Screenshots
Error Summary
Notification Banner
Thoughts
There was some questions as to whether we should use the exact same focus style as #3819, or develop ones specific to these components that replicate way that text input focus works—with the coloured border becoming thicker and only having the yellow focus colour outline it, as current.
In my mind, using the same (yellow and black) outline is the 'safer' option. As I found when digging into #3925, the Notification Banner component is currently tied to the
$govuk-brand-colour
setting and there is no requirement or guarantee that the colour used provides sufficient contrast with white. In that case, the black outline would be necessary for WCAG compliance. (However, the more ideal solution would probably be to divorce the colour of the Notification Banner from the brand colour.)