Skip to content

Commit

Permalink
Fix - FormThemeSwitch focus state now only displays when keyboard nav…
Browse files Browse the repository at this point in the history
…igation used
  • Loading branch information
gareth.james committed Oct 3, 2023
1 parent c61fc7b commit 36b4a70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
padding-right: $spacer-6;
}

.form-theme-switch__input:focus + & {
.focus-visible .form-theme-switch__input:focus + & {
@extend %focus-outer;
}
}
Expand Down
4 changes: 2 additions & 2 deletions client/src/scss/partials/setup/_a11y.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $focusable-box-shadow-focused: 0 0 0 $spacer-2 $color-state-focus;
%focusable-inner {
box-shadow: inset $focusable-box-shadow-initial;

&:focus-visible {
.focus-visible & {
&:focus { // `.focus-visible` is added to `body` with JS when the user is tabbing
@extend %focus-inner;
}
Expand All @@ -49,7 +49,7 @@ $focusable-box-shadow-focused: 0 0 0 $spacer-2 $color-state-focus;
%focusable-outer {
box-shadow: $focusable-box-shadow-initial;

&:focus-visible {
.focus-visible & {
&:focus { // `.focus-visible` is added to `body` with JS when the user is tabbing
@extend %focus-outer;
}
Expand Down

0 comments on commit 36b4a70

Please sign in to comment.