-
Notifications
You must be signed in to change notification settings - Fork 348
Fix skip link outline being clipped in forced colours mode #6445
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
Conversation
Stylesheets changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
index 2f6332e72..c48c58083 100644
--- a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
+++ b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
@@ -5243,6 +5243,12 @@ screen and (forced-colors:active) {
background-color: var(--_govuk-focus-colour, #fd0)
}
+@media (forced-colors:active) {
+ .govuk-skip-link:focus {
+ outline-offset: -3px
+ }
+}
+
.govuk-skip-link-focused-element:focus {
outline: none
}
Action run for 2916d94 |
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss b/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss
index 29de7864f..bfefeee4f 100644
--- a/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss
@@ -24,6 +24,10 @@
outline-offset: 0;
background-color: govuk-functional-colour(focus);
+ @media (forced-colors: active) {
+ outline-offset: (0 - $govuk-focus-width);
+ }
+
// Undo unwanted changes when global styles are enabled
@if $govuk-global-styles {
@include govuk-link-decoration;
Action run for 2916d94 |
📋 StatsFile sizes
No changes to module sizes. Action run for 2916d94 |
420dfe1 to
777ecef
Compare
777ecef to
d5f50df
Compare
d5f50df to
d6ab69f
Compare
d6ab69f to
0dcfb5b
Compare
0dcfb5b to
c63ab81
Compare
CHANGELOG.md
Outdated
|
|
||
| - [#5311: Remove non-operational value parameter from file upload component](https://github.com/alphagov/govuk-frontend/pull/5311) | ||
| - [#6434: Fix rebranded header background being visible when printed](https://github.com/alphagov/govuk-frontend/pull/6434) - thanks to @lewis-softwire for reporting this issue | ||
| - [#6447: Fix pagination outputting empty links when provided a null or empty value](https://github.com/alphagov/govuk-frontend/pull/6447) – thanks to @NikhilNanjappa for reporting this issue |
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.
Looks like we've picked up a stray changelog entry here?
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.
It's GONE
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.
It is! But I think we've now got some extra service nav stuff
c63ab81 to
218eb90
Compare
218eb90 to
5f00c57
Compare
romaricpascal
left a comment
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.
Neat little fix 🙌🏻
domoscargin
left a comment
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.
Just popping this in here so we don't merge before we shift the service nav hidden stuff out of this PR
5f00c57 to
f817e79
Compare
As skiplinks are typically displayed at the top of the viewport and at full width, the outline style we apply to links in forced-colors mode is clipped on all sides except for the bottom, making it more difficult to see that the link is currently focused.
Fixes #4100.
Changes
outline-offsetwhen forced-colors mode is active, so that the outline is visibly rendered within the bounds of the skip link.Screenshots