Skip to content

Commit 5d0bac0

Browse files
committed
Apply button focus indicators only on keyboard focus (#360)
1 parent ff7f6c0 commit 5d0bac0

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

sitemedia/semantic/src/site/elements/button.overrides

+1-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
border-color: @disabledTextColor;
5353
}
5454

55-
&.focus,
56-
&:focus {
55+
&:focus-visible {
5756
outline: @focusOutline;
5857
}
5958
}

srcmedia/scss/pages/_search.scss

+4
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@
150150
display: none;
151151
}
152152

153+
.button.focus {
154+
outline: 2px dashed black;
155+
}
156+
153157
.button.active {
154158
order: 1;
155159
color: white;

srcmedia/scss/snippets/_nav.scss

+1-3
Original file line numberDiff line numberDiff line change
@@ -216,16 +216,14 @@
216216
}
217217

218218
// PPA logo/brand has smaller triangle shifted to the bottom; no hover
219-
.brand .item:focus::before,
220-
.brand .item.focus::before {
219+
.brand .item:focus-visible::before {
221220
top: 54px;
222221
@include triangle-overlay($white, 42px);
223222
opacity: 1;
224223
}
225224

226225
// remove default outline focus indicator
227226
a.item:focus,
228-
a.item.focus,
229227
.item a:focus {
230228
outline: none;
231229
}

0 commit comments

Comments
 (0)