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: restore accessibility window title on macOS #21462
Conversation
Electron's `AtomNSWindow` implements `accessibilityAttributeValue` to provide various accessibility info to the OS, including window titles. Chromium 75 changed to Apple's newer accessibility API for window titles in the super class that `AtomNSWindow` inherits from. macOS still supports both the old and new style APIs, but it will prefer the new style if it is implemented. This means the Electron window title is being ignored because the newer API at the Chromium level has taken precedence. By implementing the newer accessibility API in `AtomNSWindow`, this restores correct accessibility window titles in macOS Electron apps. This is a regression has been present since Electron 6.0.0 (the first release including the Chromium change above).
💖 Thanks for opening this pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Thanks! Do you by chance have before and after screenshots or a fiddle to help verify the fix? |
@codebytere can be verified with similar steps from #13722 |
I should be able to post before / after screenshots soon as well... I forgot to capture them, and then I messed up my local build a bit by switching versions, so just waiting on fixed build to finish... 😅 |
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.
Verified locally, thanks @jryans !
Congrats on merging your first pull request! 🎉🎉🎉 |
Release Notes Persisted
|
I have automatically backported this PR to "6-1-x", please check out #21465 |
I have automatically backported this PR to "7-1-x", please check out #21466 |
I have automatically backported this PR to "8-x-y", please check out #21467 |
Description of Change
Electron's
AtomNSWindow
implementsaccessibilityAttributeValue
to provide various accessibility info to the OS, including window titles.Chromium 75 changed to Apple's newer accessibility API for window titles in the super class that
AtomNSWindow
inherits from. macOS still supports both the old and new style APIs, but it will prefer the new style if it is implemented. This means the Electron window title is being ignored because the newer API at the Chromium level has taken precedence.By implementing the newer accessibility API in
AtomNSWindow
, this restores correct accessibility window titles in macOS Electron apps. VS Code is known to be affected, but presumably all Electron apps have a similar issue.This is a regression that has been present since Electron 6.0.0 (the first release including the Chromium change above).
It looks like @codebytere has modified these files in the past, potentially they are interested.
Checklist
npm test
passesRelease Notes
Notes: Fixed accessibility window title on macOS