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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for keyboard initialized menu popup #38903

Merged
merged 6 commits into from
Jun 29, 2023

Conversation

MarshallOfSound
Copy link
Member

@MarshallOfSound MarshallOfSound commented Jun 22, 2023

Solves some accessibility issues with menu.popup for keyboard nav accessibility users

This PR also floats a patch that I intend to upstream. Chrome does not follow standard accessibility behaviour currently (when compared to native menus and even the //views implementation of menus that Edge uses) so this patch should go upstream to benefit all screen reader users too 馃憤

Notes: Added support for flagging a Menu as being keyboard initiated

@electron-cation electron-cation bot added the new-pr 馃尡 PR opened in the last 24 hours label Jun 22, 2023
@MarshallOfSound MarshallOfSound added semver/minor backwards-compatible functionality target/26-x-y PR should also be added to the "26-x-y" branch. labels Jun 22, 2023
docs/api/menu.md Outdated Show resolved Hide resolved
@MarshallOfSound MarshallOfSound requested a review from a team as a code owner June 26, 2023 07:52
lib/browser/api/menu.ts Show resolved Hide resolved
Copy link
Member

@zcbenz zcbenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with this, but we should probably wait for upstream's review on the patch before merging it.

Copy link
Member

@samuelmaddock samuelmaddock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

docs/api/menu.md Outdated Show resolved Hide resolved
Copy link
Member

@erickzhao erickzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
@MarshallOfSound
Copy link
Member Author

The code change was +1'ed upstream so landing here https://chromium-review.googlesource.com/c/chromium/src/+/4656821

@MarshallOfSound MarshallOfSound merged commit 499d893 into main Jun 29, 2023
14 of 16 checks passed
@MarshallOfSound MarshallOfSound deleted the like-and-subscribe branch June 29, 2023 22:54
@release-clerk
Copy link

release-clerk bot commented Jun 29, 2023

Release Notes Persisted

Added support for flagging a Menu as being keyboard initiated

@trop
Copy link
Contributor

trop bot commented Jun 29, 2023

I have automatically backported this PR to "26-x-y", please check out #38954

@trop trop bot added in-flight/26-x-y merged/26-x-y PR was merged to the "26-x-y" branch. and removed target/26-x-y PR should also be added to the "26-x-y" branch. in-flight/26-x-y labels Jun 29, 2023
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
* feat: add support for keyboard initialized menu popup

* Update docs/api/menu.md

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* fix: add patch to chromium for keyboard accessibility menu behavior

* refactor: s/initiatedByKeyboard/sourceType

* fix: ignore initial mouse event to retain keyboard initiated focus

* Update docs/api/menu.md

Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>

---------

Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review/requested 馃棾 merged/26-x-y PR was merged to the "26-x-y" branch. new-pr 馃尡 PR opened in the last 24 hours semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants