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

[MenuList] Add home and end key support #14212

Merged
merged 7 commits into from
Jan 18, 2019

Conversation

dallin-christensen
Copy link
Contributor

@dallin-christensen dallin-christensen commented Jan 17, 2019

Closes #13865

MenuList now supports the use of home and end keys, changing focus to the first and last ListItem.

@oliviertassinari oliviertassinari added component: menu This is the name of the generic UI component, not the React module! new feature New feature or request accessibility a11y labels Jan 17, 2019
@dallin-christensen
Copy link
Contributor Author

@oliviertassinari this change definitely works, the focus changes from the first ListItem on home and the last ListItem on end, but for whatever reason, the focus styles don't work without that extra bit of styling I inserted. So this technically works, but the user won't be able to see the first or last items being in focus. Would you like me to see if I can get it working without affecting any of the other styles?

@oliviertassinari
Copy link
Member

@dallin-christensen Oh right. I might have a fix.

@oliviertassinari oliviertassinari changed the title [MenuList] home and end key functionality [MenuList] Add home and end key support Jan 17, 2019
/* Styles applied to the `component`'s `focusVisibleClassName` property if `button={true}`. */
focusVisible: {
backgroundColor: theme.palette.action.hover,
Copy link
Member

Choose a reason for hiding this comment

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

This style is almost 3 years old: 9a9ea7e.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha. The changes look great! And all tests passing 👍

@oliviertassinari oliviertassinari merged commit 59cf06e into mui:master Jan 18, 2019
@oliviertassinari
Copy link
Member

@dallin-christensen Well done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y component: menu This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants