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

Support quickly moving focus to search #8312

Open
parlough opened this issue Nov 19, 2024 · 2 comments
Open

Support quickly moving focus to search #8312

parlough opened this issue Nov 19, 2024 · 2 comments
Labels
Accessibility Issues with the accessibility of the site. Type: enhancement

Comments

@parlough
Copy link
Member

pub.dev should support a shortcut to quickly move focus to the search bar. On the home and search pages, this would be the larger one, and on other pages, the one in the navbar.

Support "/" on all platforms, "Cmd+K" on macOS, and "Ctrl+K" on non-mac platforms

@sigurdm sigurdm added Accessibility Issues with the accessibility of the site. Type: enhancement labels Nov 19, 2024
@sigurdm
Copy link
Contributor

sigurdm commented Nov 19, 2024

Support "/" on all platforms, "Cmd+K" on macOS, and "Ctrl+K" on non-mac platforms

Do we have documentation on why these are the exact keys?

@isoos
Copy link
Collaborator

isoos commented Nov 19, 2024

On the landing page and on the search page we auto-focus on the search bar, and on other pages we do have support for "/".
I'm a bit unsure about the Ctrl/Cmd+K shortcut, as it seems to be used by Chrome as a default searchbar operation, and it seems to be not ideal to catch that. Note: Github seems to support only "/".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Issues with the accessibility of the site. Type: enhancement
Projects
None yet
Development

No branches or pull requests

3 participants