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

Make Popover initial focus work with screen readers. #5732

Merged
merged 1 commit into from Apr 11, 2018

Conversation

Projects
None yet
2 participants
@afercia
Contributor

afercia commented Mar 21, 2018

Te current implementation of the initial focus in the Popover component doesn't work when a screen reader is running. Screen readers intercept key presses, and they pass them back to the browsers only in specific circumstances. For example, when in "forms mode", or when in an ARIA widget with a specific ARIA role that expects specific keyboard events to happen.

In most of the other cases the browser is unaware a keyboard event has happened. In this specific case, this prevents the initial focus to be correctly set on the Popover component.

For more details and testing, please refer to the related issue, particularly to this comment: #5559 (comment)

Also, as noted in the related issue, many users are not exclusively "mouse users" or "keyboard users". Implementing the initial focus in a way that works only when there's the assumption a keyboard is being used wouldn't serve well users who make a mixed use of mouse and keyboard, or other devices.

Note: the patch removes a related test.

Fixes #5559

@aduth

aduth approved these changes Apr 11, 2018

@aduth aduth merged commit c17b668 into master Apr 11, 2018

2 checks passed

codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +55.83% compared to 030b562
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@aduth aduth deleted the update/popover-initial-focus-improved-a11y branch Apr 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment