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

Components: Restrict Popover focusOnMount to keyboard interaction #5318

Merged
merged 2 commits into from
Mar 7, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Feb 28, 2018

Related: #2323

This pull request seeks to improve the behavior of Popover's focusOnMount prop to apply only when the component mounts in response to a keyboard interaction. The focusOnMount prop (and its FocusManaged counterpart) are particularly useful for enabling a keyboard user to navigate contents of a popover after it's been opened. This behavior is not applicable for touch or pointer device users, and has historically caused some uncertainty, particularly in the editor menu where the focus styling effects can be mistaken for the selected item.

Before (Pointer) After (Pointer)
Before (Pointer) After (Pointer)
Before (Keyboard) After (Keyboard)
Before (Keyboard) After (Keyboard)

Testing instructions:

Verify that focusOnMount behavior takes effect when navigating via keyboard.

Verify that focusOnMount behavior does not take effect when navigating via touch or pointer device.

@aduth aduth added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] UI Components Impacts or related to the UI component system labels Feb 28, 2018
@aduth aduth requested a review from afercia February 28, 2018 22:19
@aduth aduth force-pushed the update/focus-on-mount-keyboard branch from 34445a6 to c54b76c Compare March 7, 2018 16:00
@aduth aduth force-pushed the update/focus-on-mount-keyboard branch from c54b76c to b65d951 Compare March 7, 2018 16:14
@aduth aduth merged commit 4356638 into master Mar 7, 2018
@aduth aduth deleted the update/focus-on-mount-keyboard branch March 7, 2018 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant