Navigation Menu

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: restore accessibility window title on macOS #21462

Merged
merged 1 commit into from Dec 10, 2019

Conversation

jryans
Copy link
Contributor

@jryans jryans commented Dec 10, 2019

Description of Change

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. 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

Release Notes

Notes: Fixed accessibility window title on macOS

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).
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Dec 10, 2019
@welcome
Copy link

welcome bot commented Dec 10, 2019

💖 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:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

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.

@codebytere codebytere self-requested a review December 10, 2019 20:18
@codebytere
Copy link
Member

Thanks! Do you by chance have before and after screenshots or a fiddle to help verify the fix?

@deepak1556
Copy link
Member

@codebytere can be verified with similar steps from #13722

@jryans
Copy link
Contributor Author

jryans commented Dec 10, 2019

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... 😅

Copy link
Member

@deepak1556 deepak1556 left a 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 !

@deepak1556
Copy link
Member

deepak1556 commented Dec 10, 2019

Screen Shot 2019-12-10 at 2 14 26 PM

@deepak1556 deepak1556 merged commit a5c9bd5 into electron:master Dec 10, 2019
@welcome
Copy link

welcome bot commented Dec 10, 2019

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

release-clerk bot commented Dec 10, 2019

Release Notes Persisted

Fixed accessibility window title on macOS

@trop
Copy link
Contributor

trop bot commented Dec 10, 2019

I have automatically backported this PR to "6-1-x", please check out #21465

@trop
Copy link
Contributor

trop bot commented Dec 10, 2019

I have automatically backported this PR to "7-1-x", please check out #21466

@trop trop bot added the in-flight/6-1-x label Dec 10, 2019
@trop
Copy link
Contributor

trop bot commented Dec 10, 2019

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

@sofianguy sofianguy added this to Fixed in 8.0.0-beta.5 in 8.2.x Jan 14, 2020
@sofianguy sofianguy added this to Fixed in 7.1.5 in 7.2.x Jan 14, 2020
@sofianguy sofianguy added this to Fixed in 6.1.6 in 6.1.x Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-pr 🌱 PR opened in the last 24 hours
Projects
No open projects
6.1.x
Fixed in 6.1.6
7.2.x
Fixed in 7.1.5
8.2.x
Fixed in 8.0.0-beta.5
Development

Successfully merging this pull request may close these issues.

None yet

3 participants