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

fix(a11y): focus monitor incorrectly detecting fake mousedown from screen reader #15214

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

crisbeto
Copy link
Member

In some cases screen readers dispatch a fake mousedown event, instead of a keydown which causes the FocusMonitor to register focus as if it's coming from a keyboard interaction. An example where this is visible is in the mat-datepicker calendar where having screen reader on and opening the calendar with the keyboard won't show the focus indication, whereas it's visible if the screen reader is turned off.

These changes add an extra check that will detect fake mousedown events correctly.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Feb 16, 2019
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Feb 16, 2019
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 jelbourn added pr: lgtm Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker labels Feb 19, 2019
@mmalerba mmalerba added aaa and removed aaa labels Apr 25, 2019
@mmalerba mmalerba removed their assignment Aug 12, 2019
@crisbeto crisbeto added the P2 The issue is important to a large percentage of users, with a workaround label Dec 25, 2019
…reen reader

In some cases screen readers dispatch a fake `mousedown` event, instead of a `keydown` which causes the `FocusMonitor` to register focus as if it's coming from a keyboard interaction. An example where this is visible is in the `mat-datepicker` calendar where having screen reader on and opening the calendar with the keyboard won't show the focus indication, whereas it's visible if the screen reader is turned off.

These changes add an extra check that will detect fake mousedown events correctly.
@crisbeto crisbeto force-pushed the focus-monitor-fake-mousedown branch from 8f92467 to 8932565 Compare March 14, 2020 20:12
@mmalerba mmalerba merged commit 695dde6 into angular:master Apr 9, 2020
mmalerba pushed a commit that referenced this pull request Apr 14, 2020
In some cases screen readers dispatch a fake `mousedown` event, instead of a `keydown` which causes the `FocusMonitor` to register focus as if it's coming from a keyboard interaction. An example where this is visible is in the `mat-datepicker` calendar where having screen reader on and opening the calendar with the keyboard won't show the focus indication, whereas it's visible if the screen reader is turned off.

These changes add an extra check that will detect fake mousedown events correctly.
@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 May 10, 2020
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 P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants