Skip to content

Commit

Permalink
Rollup merge of rust-lang#78868 - notriddle:master, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Dylan-DPC authored Nov 8, 2020
2 parents 38bfdae + 9dc5dfb commit 7cc8ab3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/librustdoc/html/static/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
}

.toggle input {
display: none;
opacity: 0;
position: absolute;
}

.select-wrapper {
Expand Down Expand Up @@ -90,7 +91,7 @@ input:checked + .slider {
}

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

input:checked + .slider:before {
Expand Down

0 comments on commit 7cc8ab3

Please sign in to comment.