diff options
| author | Michael Howell <michael@notriddle.com> | 2023-04-21 16:28:05 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-04-21 16:42:23 -0700 |
| commit | 5cefe75436e18ed54a78cd883f00aacc50ce2f4f (patch) | |
| tree | 2e6f966ea94abf7527e2d68f79d96404b6988ea8 /tests | |
| parent | fec9adcdbc21469ef105162cc8cabf81c72d06be (diff) | |
| download | rust-5cefe75436e18ed54a78cd883f00aacc50ce2f4f.tar.gz rust-5cefe75436e18ed54a78cd883f00aacc50ce2f4f.zip | |
rustdoc: remove unneeded handleKey from settings.js
This code was added in 9dc5dfb97504c538bc72f367a77bb9f714c30097 and 704050da2334c465784954d81c8990c4bc7a92c5 because the browser- native checkbox was `display: none`, breaking native keyboard accessibility. The native checkbox is now merely `appearance: none`, which does not turn off [behavior semantics], so JavaScript to reimplement it isn't needed any more. [behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rustdoc-gui/settings.goml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/settings.goml b/tests/rustdoc-gui/settings.goml index 733be9bebba..a44ff9d3e4a 100644 --- a/tests/rustdoc-gui/settings.goml +++ b/tests/rustdoc-gui/settings.goml @@ -256,6 +256,15 @@ set-local-storage: {"rustdoc-disable-shortcuts": "false"} click: ".setting-line:last-child .setting-check span" assert-local-storage: {"rustdoc-disable-shortcuts": "true"} +// We now check that focusing a toggle and pressing Space is like clicking on it. +assert-local-storage: {"rustdoc-disable-shortcuts": "true"} +focus: ".setting-line:last-child .setting-check input" +press-key: "Space" +assert-local-storage: {"rustdoc-disable-shortcuts": "false"} +focus: ".setting-line:last-child .setting-check input" +press-key: "Space" +assert-local-storage: {"rustdoc-disable-shortcuts": "true"} + // Make sure that "Disable keyboard shortcuts" actually took effect. press-key: "Escape" press-key: "?" |
