Skip to content

Pressing space to close a header menu (navigating with keyboard instead of mouse) will scroll down the page, not just close the menu #1082

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

Closed
jyn514 opened this issue Oct 8, 2020 · 7 comments · Fixed by #1141
Labels
A-frontend Area: Web frontend C-bug Category: This is a bug P-low Low priority issues

Comments

@jyn514
Copy link
Member

jyn514 commented Oct 8, 2020

Originally posted by @jyn514 in #1081 (comment)

@jyn514 jyn514 added A-frontend Area: Web frontend C-bug Category: This is a bug P-low Low priority issues labels Oct 8, 2020
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Oct 8, 2020

It's not a bug. If you want an interaction with just the item and nothing else, you have the "enter" key. Space is supposed to scroll except when in a text field.

@jyn514
Copy link
Member Author

jyn514 commented Oct 8, 2020

@GuillaumeGomez space should either scroll or open the menu. It shouldn't do both.

@GuillaumeGomez
Copy link
Member

I'd argue it definitely should. :p

@GuillaumeGomez
Copy link
Member

Or more like: we shouldn't handle this ourselves.

@jyn514
Copy link
Member Author

jyn514 commented Oct 8, 2020

If you want to remove space handling and make it so you can only open the menu with enter, I'm fine with that. But the current behavior is not at all helpful or expected.

@GuillaumeGomez
Copy link
Member

It's definitely expected. If I use space and I'm not in a text field, it's supposed to scroll down.

notriddle added a commit to notriddle/docs.rs that referenced this issue Oct 29, 2020
notriddle added a commit to notriddle/docs.rs that referenced this issue Oct 30, 2020
@notriddle
Copy link
Contributor

It's not a bug. If you want an interaction with just the item and nothing else, you have the "enter" key. Space is supposed to scroll except when in a text field.

I've opened a pull request that traps the space key entirely. I'm willing to entertain the possibility of not handling the spacebar at all, too:

  • The example set by WAI and by the menus on GitHub both trap space. I don't want to deviate from industry consensus without very good reason.

  • Enter still acts as "link click" when the right-side drop down menus are selected.

notriddle added a commit to notriddle/docs.rs that referenced this issue Oct 30, 2020
notriddle added a commit to notriddle/docs.rs that referenced this issue Oct 30, 2020
jyn514 pushed a commit that referenced this issue Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Web frontend C-bug Category: This is a bug P-low Low priority issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants