A11Y: add focus state for advanced search toggles (#17894)

Using `focus-visible` to ensure this only shows when navigating using
a keyboard.
This commit is contained in:
Penar Musaraj 2022-08-14 21:36:55 -04:00 committed by GitHub
parent 3fd929534c
commit a32019d1e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -157,14 +157,21 @@
details.advanced-filters,
details.search-advanced-additional-options {
margin-top: 1em;
> summary {
color: var(--tertiary);
cursor: pointer;
padding-top: 0.25em;
padding-bottom: 0.25em;
&:focus-visible {
background-color: var(--tertiary-very-low);
}
}
&[open] > summary {
color: var(--primary);
margin-bottom: 1em;
&:focus-visible {
background-color: var(--tertiary-very-low);
}
}
}