-
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
feat(menu): support typeahead focus #7385
Conversation
@crisbeto, any chance to do something like this on mat-select too? |
@julianobrasil this has been available on the select for a while now. |
The W3C authoring practices don't mention this behavior for menus- does this come from a specific resource? |
Not from a specific resource @jelbourn, but it's something I've noticed being done natively on MacOS. Windows also has something similar, although it executes the item action as well. |
I sent off a question to our internal a11y folks to see if there's any reason to avoid this behavior. |
Feedback is that it is good to add. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just needs rebase |
Adds support for focusing menu items via the character keys.
617746b
to
731f606
Compare
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. |
Adds support for focusing menu items via the character keys.
Note: I'm not sure whether using all top-level text nodes to determine the menu item text isn't too big of an assumption (e.g. it won't be accurate for the case where all the content is wrapped in a
strong
tag). Alternatively I can add a special case formd-icon
or just take thetextContent
verbatim.