docs.rs icon indicating copy to clipboard operation
docs.rs copied to clipboard

Allow focusing query search field via accesskey

Open xitep opened this issue 1 year ago • 3 comments

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 avatar Dec 28 '23 10:12 xitep

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

GuillaumeGomez avatar Dec 28 '23 12:12 GuillaumeGomez

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

syphar avatar Feb 14 '24 10:02 syphar

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 :/)

xitep avatar Feb 14 '24 11:02 xitep