-
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): add keyboard events and improve accessibility #1132
Conversation
* to focus the first item when the menu is opened by the ENTER key. | ||
* TODO: internal | ||
*/ | ||
_focusFirstItem() { this.items.first.focus(); } |
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.
Personally I prefer to always have the newlines for method definitions
5a9ba46
to
0bb6e93
Compare
@jelbourn Comments should be addressed, and updated the keyboard behavior. |
also adds `aria-hasPopup="true"` to the trigger element. | ||
|
||
#### Keyboard events: | ||
- <kbd>DOWN_ARROW</kbd> or <kbd>TAB</kbd>: Focus next menu item |
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.
Do you need to remove Tab
shortcuts now?
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.
Yes! Good catch. Updating..
LGTM aside from that one comment |
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. |
This PR adds keyboard events and proper focus management to the menu.
r: @jelbourn