-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
menu up/down arrow does not navigate the overlay #4991
Comments
Some background: We originally designed it so that the first menu item will focus when the menu opens, but only if you navigate to the menu with the keyboard. So if you tab to the menu and hit enter to open it, you should see the menu items switch focus as you navigate with the arrow keys. However, if you use the mouse to open the menu, we don't focus the first item so that none of the menu items are initially highlighted (which is what the spec requires visually). This implementation is confusing because all we really care about is that the initial appearance is different between the two input types. The arrow keys should always work to move the focus, so we should fix that. |
Ah, I see what you are saying Kara what you described does indeed work. Are you okay with me giving this a go? |
Sure, give it a go. Just keep in mind that the actual implementation will need to be distinct from the autocomplete because they have different accessibility needs. While the focus should never leave the input in an autocomplete (it just appears to focus the list items and uses active-descendant instead), menu items will need to get real focus. |
Fixes the menu keyboard interactions not working when it is opened by a click. Fixes angular#4991.
Fixes the menu keyboard interactions not working when it is opened by a click. Fixes angular#4991.
Fixes the menu keyboard interactions not working when it is opened by a click. Fixes angular#4991.
Fixes the menu keyboard interactions not working when it is opened by a click. Fixes angular#4991.
Fixes the menu keyboard interactions not working when it is opened by a click. Fixes angular#4991.
Fixes the menu keyboard interactions not working when it is opened by a click. Fixes angular#4991.
Fixes the menu keyboard interactions not working when it is opened by a click. Fixes angular#4991.
Fixes the menu keyboard interactions not working when it is opened by a click. Fixes angular#4991.
Fixes the menu keyboard interactions not working when it is opened by a click. Fixes angular#4991.
Fixes the menu keyboard interactions not working when it is opened by a click. Fixes #4991.
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. |
Bug, feature request, or proposal:
Menu does not properly navigate with up/down arrows, also enter key does not work since you can't navigate with the up/down.
This work's just fine in autocomplete cause it is handling the up/down/enter key but this must have just been missed in menu.
What is the expected behavior?
Should be able to open a menu and click down arrow to the first element, second and than go back up to the first for example.
What is the current behavior?
Current behavior is up/down arrow will actually scroll the page.
What are the steps to reproduce?
Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: https://goo.gl/DlHd6U
https://material.angular.io/components/component/menu
Can do it with the basic menu example above.
What is the use-case or motivation for changing an existing behavior?
Users should be able to navigate the menu via keyboard.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Latest in Material2
Is there anything else we should know?
I would be glad to make the code updates for you guys let me know.
The text was updated successfully, but these errors were encountered: