Skip to content

Commit 9dc5dfb

Browse files
committed
Fix tab focus on restyled switches
Setting a checkbox to `display:none` makes it impossible to tab onto it, which makes the rustdoc settings page completely keyboard inaccessible.
1 parent 17b8ca9 commit 9dc5dfb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustdoc/html/static/settings.css

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
}
2727

2828
.toggle input {
29-
display: none;
29+
opacity: 0;
30+
position: absolute;
3031
}
3132

3233
.select-wrapper {
@@ -90,7 +91,7 @@ input:checked + .slider {
9091
}
9192

9293
input:focus + .slider {
93-
box-shadow: 0 0 1px #2196F3;
94+
box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3);
9495
}
9596

9697
input:checked + .slider:before {

0 commit comments

Comments
 (0)