-
Couldn't load subscription status.
- Fork 6.8k
fix(cdk/a11y): detect fake touchstart events from screen readers #21987
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
Conversation
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.
LGTM
51269d2 to
8765143
Compare
We currently have handling for the case where a `mousedown` event is thrown off by a fake `mousedown` listener that may be dispatched by a screen reader when an element is activated. It turns out that if the device has touch support, screen readers may dispatch a fake `touchstart` event instead of a fake `mousedown`. These changes add another utility function that allows us to distinguish the fake events and fix some issues where keyboard focus wasn't being shown because of the fake `touchstart` events. Fixes angular#21947.
8765143 to
e0c153c
Compare
) We currently have handling for the case where a `mousedown` event is thrown off by a fake `mousedown` listener that may be dispatched by a screen reader when an element is activated. It turns out that if the device has touch support, screen readers may dispatch a fake `touchstart` event instead of a fake `mousedown`. These changes add another utility function that allows us to distinguish the fake events and fix some issues where keyboard focus wasn't being shown because of the fake `touchstart` events. Fixes #21947. (cherry picked from commit c7edf03)
|
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. |
We currently have handling for the case where a
mousedownevent is thrown off by a fakemousedownlistener that may be dispatched by a screen reader when an element is activated. It turns out that if the device has touch support, screen readers may dispatch a faketouchstartevent instead of a fakemousedown.These changes add another utility function that allows us to distinguish the fake events and fix some issues where keyboard focus wasn't being shown because of the fake
touchstartevents.Fixes #21947.