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(cdk/menu): control + option + space not working on VoiceOver #27401

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jul 3, 2023

In #26296 I added a condition in the click handler for menu triggers and menu items to skip clicks dispatched by the keyboard so that they don't trigger the menu twice. The problem is that this also ends up ignoring the default keyboard shortcut that VoiceOver mentions should be used to trigger the menu (Control + Option + Space), because it ends up being dispatched as a plain click event and it doesn't trigger the keydown event at all.

These changes address the issue by removing the previous condition and inferring whether the event will trigger a click by looking at it and the element it's coming from.

Fixes #27376.

In angular#26296 I added a condition in the click handler for menu triggers and menu items to skip clicks dispatched by the keyboard so that they don't trigger the menu twice. The problem is that this also ends up ignoring the default keyboard shortcut that VoiceOver mentions should be used to trigger the menu (Control + Option + Space), because it ends up being dispatched as a plain `click` event and it doesn't trigger the `keydown` event at all.

These changes address the issue by removing the previous condition and inferring whether the event will trigger a click by looking at it and the element it's coming from.

Fixes angular#27376.
@crisbeto crisbeto added 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 labels Jul 3, 2023
src/cdk/menu/menu-trigger.ts Show resolved Hide resolved
@crisbeto crisbeto self-assigned this Jul 3, 2023
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jul 3, 2023
@crisbeto crisbeto merged commit 8e4a2ec into angular:main Jul 3, 2023
crisbeto added a commit that referenced this pull request Jul 3, 2023
)

In #26296 I added a condition in the click handler for menu triggers and menu items to skip clicks dispatched by the keyboard so that they don't trigger the menu twice. The problem is that this also ends up ignoring the default keyboard shortcut that VoiceOver mentions should be used to trigger the menu (Control + Option + Space), because it ends up being dispatched as a plain `click` event and it doesn't trigger the `keydown` event at all.

These changes address the issue by removing the previous condition and inferring whether the event will trigger a click by looking at it and the element it's coming from.

Fixes #27376.

(cherry picked from commit 8e4a2ec)
stephenrca pushed a commit to stephenrca/components that referenced this pull request Aug 2, 2023
…ular#27401)

In angular#26296 I added a condition in the click handler for menu triggers and menu items to skip clicks dispatched by the keyboard so that they don't trigger the menu twice. The problem is that this also ends up ignoring the default keyboard shortcut that VoiceOver mentions should be used to trigger the menu (Control + Option + Space), because it ends up being dispatched as a plain `click` event and it doesn't trigger the `keydown` event at all.

These changes address the issue by removing the previous condition and inferring whether the event will trigger a click by looking at it and the element it's coming from.

Fixes angular#27376.
@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 Aug 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker 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.

bug(cdk/menu): Mac OS VoiceOver cannot operate menu
2 participants