Skip to content

Allow focusing query search field via accesskey#2369

Open
xitep wants to merge 1 commit intorust-lang:mainfrom
xitep:master
Open

Allow focusing query search field via accesskey#2369
xitep wants to merge 1 commit intorust-lang:mainfrom
xitep:master

Conversation

@xitep
Copy link

@xitep xitep commented Dec 28, 2023

Conveniently focus the search field via alt+shift+q (e.g. in FF); the particular key is opinionated of course, but i remember "q" (for "query") being fairly standard some years ago.

@xitep xitep requested a review from a team as a code owner December 28, 2023 10:50
@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Dec 28, 2023
@GuillaumeGomez
Copy link
Member

accesskey seems to be quite tricky to use based on MDN. Not sure it's the right way to do it...

Copy link
Member

@syphar syphar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I admit I never saw accesskey being used, and never used alt+shift+something in FF.

Would it show the possible access key in the text-field itself? How would user discover this?

Is q the thing that other websites use too? Do you have an example? I see that both gitlab & github use / as direct shortcut, and not the access_key.

@syphar
Copy link
Member

syphar commented Feb 14, 2024

also, it seems like the concerns are mostly around accessibility, and issues with using multiple keys.

@xitep
Copy link
Author

xitep commented Feb 14, 2024

unfortunately, "accesskey" has got very much out of fashion on the web :( and, admittedly, is being superseded by web pages taking care of keyboard navigation (each) in their own way. it must be more than 15 years ago in the meantime, but i remember using alt+shift+q pretty frequently, especially to focus search/query fields.

i agree that it would make more sense to align with the existing shortcut machinery of docs.rs; i might give it a try if i manage to get docs.rs app running locally (but chances are rather bleak due to other responsibilities :/)

@syphar syphar added S-waiting-on-author Status: This PR is incomplete or needs to address review comments and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Feb 14, 2024
@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2026

☔ The latest upstream changes (possibly #3242) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This PR is incomplete or needs to address review comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants