Skip to content
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

Merged
merged 2 commits into from
Oct 4, 2017

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Sep 28, 2017

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 for md-icon or just take the textContent verbatim.

@crisbeto crisbeto added Accessibility This issue is related to accessibility (a11y) pr: needs review labels Sep 28, 2017
@crisbeto crisbeto requested a review from kara as a code owner September 28, 2017 09:23
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 28, 2017
@julianobrasil
Copy link
Contributor

@crisbeto, any chance to do something like this on mat-select too?

@crisbeto
Copy link
Member Author

@julianobrasil this has been available on the select for a while now.

@jelbourn
Copy link
Member

jelbourn commented Oct 3, 2017

The W3C authoring practices don't mention this behavior for menus- does this come from a specific resource?

@crisbeto
Copy link
Member Author

crisbeto commented Oct 4, 2017

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.

@jelbourn
Copy link
Member

jelbourn commented Oct 4, 2017

I sent off a question to our internal a11y folks to see if there's any reason to avoid this behavior.

@jelbourn
Copy link
Member

jelbourn commented Oct 4, 2017

Feedback is that it is good to add.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn
Copy link
Member

jelbourn commented Oct 4, 2017

Just needs rebase

Adds support for focusing menu items via the character keys.
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Oct 4, 2017
@kara kara merged commit f0d20ca into angular:master Oct 4, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants