Skip to content

Commit 8afe948

Browse files
authored
Merge pull request #3481 from projectblacklight/backport-facet-focus-ring
[backport 8.x] accessibility fix: facet focus ring styles
2 parents ab210bd + bed9f79 commit 8afe948

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

app/assets/stylesheets/blacklight/_facets.scss

+11-12
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,7 @@
1414
--bl-facets-smallish-margin-bottom: #{$spacer};
1515
--bl-facets-smallish-border-radius: #{$border-radius};
1616

17-
.navbar-toggler {
18-
--bs-navbar-toggler-padding-x: #{$navbar-toggler-padding-x};
19-
--bs-navbar-toggler-padding-y: #{$navbar-toggler-padding-y};
20-
--bs-navbar-toggler-border-color: #{$navbar-light-toggler-border-color};
21-
--bs-navbar-toggler-border-radius: #{$navbar-toggler-border-radius};
22-
color: $navbar-light-active-color;
23-
24-
&:hover,
25-
&:focus {
26-
color: $navbar-light-active-color;
27-
}
28-
17+
.facet-toggle-button {
2918
[data-hide-label] {
3019
display: inline;
3120
}
@@ -114,6 +103,16 @@
114103
.card-body {
115104
padding: var(--bl-facet-limit-body-padding);
116105
}
106+
107+
/* Provide a focus ring on the expand/collapse button */
108+
.btn {
109+
--bs-btn-focus-shadow-rgb: 50, 50, 50;
110+
&:focus-visible {
111+
border-color: var(--bs-btn-hover-border-color);
112+
outline: 0;
113+
box-shadow: var(--bs-btn-focus-box-shadow);
114+
}
115+
}
117116
}
118117

119118
.facet-limit-active {

app/components/blacklight/response/facet_group_component.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<%= content_tag :h2, @title, class: 'facets-heading' if @title %>
55
66
<%= content_tag :button,
7-
class:'navbar-toggler navbar-toggler-right',
7+
class: 'btn btn-outline-secondary facet-toggle-button d-block d-lg-none',
88
type: 'button',
99
data: {
1010
toggle: 'collapse',

0 commit comments

Comments
 (0)