-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 spacebar and enter key press on AnchorButtons #430
Comments
Note that currently, pressing the spacebar on an Also currently, pressing the enter key on an |
Thanks for the detailed behavior explanation. Is this consistent across browsers? Should we attempt to replicate the button behavior for AnchorButton? Or perhaps standardize both to a simple single click? |
Almost, as far as I can tell. In FF, holding down space doesn't trigger the button's active state, but the timing of when the events are fired is the same (upon spacebar release, and while the enter key is held down) |
I think we likely should - nicer to have Blueprint buttons follow standard browser interaction semantics than do something different. I think it should be pretty easy to replicate actually: enter fires |
It's something that's terribly inconsistent across browser. I'm on board to make this great in Blueprint, but let's be careful and not break
Is it standard stuff? I never knew about the difference between |
it'll only work for |
I'm unsure. It's the behavior I observed in Chrome and in FF, but I don't know if it's an official standard, or just an implementation detail that both browsers agree on |
Ideally, it would be great if
AnchorButton
behaved likeButton
/<button>
when it has focus and the space bar or enter key is pressed. (At the least, they should trigger theonClick
handler, even if the exact active state behavior isn't identical.) This is needed for users who do everything via the keyboard and also for accessibility reasons.The text was updated successfully, but these errors were encountered: