Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: add visible focus outline to rustdoc-toggle #103554

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Oct 25, 2022

The change in opacity is inconsistent with most of rustdoc, which uses default browser styles for the focus outline. Unfortunately, just using the default focus outline here won't work, because it gets applied to the summary itself instead of the pseudo-element "real button."

Preview: https://notriddle.com/notriddle-rustdoc-demos/focus-outline/test_dingus/fn.test.html

Screenshots

light

image

dark

image

ayu

image

The change in opacity is inconsistent with most of rustdoc, which uses
default browser styles for the focus outline. Unfortunately, just using
the default focus outline here won't work, because it gets applied to
the summary itself instead of the pseudo-element "real button."
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 25, 2022
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 25, 2022
@rustbot
Copy link
Collaborator

rustbot commented Oct 25, 2022

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@jsha
Copy link
Contributor

jsha commented Oct 26, 2022

FWIW the default focus ring on Chrome / Linux (Ubuntu) is a solid black line rather than a thin dashed line. But I think it's okay to not match focus styles exactly; just doing an outline vs opacity is a big win.

Co-authored-by: Jacob Hoffman-Andrews <github@hoffman-andrews.com>
@jsha
Copy link
Contributor

jsha commented Oct 26, 2022

Thanks! r=me after CI passes.

@notriddle
Copy link
Contributor Author

@bors r=jsha rollup

@bors
Copy link
Contributor

bors commented Oct 26, 2022

📌 Commit b857138 has been approved by jsha

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 26, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 26, 2022
Rollup of 6 pull requests

Successful merges:

 - rust-lang#95710 (Stabilize arbitrary_enum_discriminant, take 2)
 - rust-lang#102706 (Support excluding the generation of the standalone docs)
 - rust-lang#103428 (Removed verbose printing from the `PrettyPrinter` when printing constants)
 - rust-lang#103543 (Update books)
 - rust-lang#103546 (interpret: a bit of cast cleanup)
 - rust-lang#103554 (rustdoc: add visible focus outline to rustdoc-toggle)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@GuillaumeGomez
Copy link
Member

It'd be nice to add a GUI test to enforce it.

@bors bors merged commit 74a4c67 into rust-lang:master Oct 26, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 26, 2022
@notriddle notriddle deleted the notriddle/summary-focus-visible branch October 26, 2022 18:05
pietroalbini added a commit to ferrocene/sphinx-shared-resources that referenced this pull request Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants