-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
bug(tabs): mat-tab-nav-bar tab working with space but not with enter key #27843
Comments
Hello folks, Thank you for reporting this issue. I agree with the expected behavior, I would expect Enter or Space to perform the same action as clicking. We explicitly say that we support Enter and Space in the keyboard interaction documentation, it's needed to meet accessibility requirements I investigated this issue. To summarize, both changes to the example code and implemented of There are two ways I would expect the api of API designs of
|
Hello @mmalerba or @crisbeto (or anyone who is more familiar with tabs than me) I was wondering if you have more information on the high level design and intention of MatTabNav. That way I can better understanding what a correct outcome would look like. I'm confused by the API design and intentions of Is the intention that using Best regards, Zach |
Thank you for your answer! ^_^ |
@zarend the idea with |
Yes, requirement is that end user can click link with space or enter keys. To fix this, I suggest two things: |
Fixes that the tab nav bar wasn't navigating when pressing the enter key. Fixes angular#27843.
The nav bar intentionally doesn't implement As for supporting ENTER key presses, I've opened #27862 to fix it. |
Fixes that the tab nav bar wasn't navigating when pressing the enter key. Fixes #27843.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Is this a regression?
The previous version in which this bug was not present was
No response
Description
Previously the mat-tab-nav-bar tabs could be activated both with space and enter, while now the space key still works but the enter doesn't trigger the action anymore.
Reproduction
Link: https://material.angular.io/components/tabs/examples official material example (Basic tab nav bar)
Steps to reproduce:
Expected Behavior
Pressing Enter the tab should be activated like when using hte Space.
Actual Behavior
Pressing Space works, while pressing Enter doesn't and the tab link isn't activated.
Environment
The text was updated successfully, but these errors were encountered: