Skip to content

fix: restore accessibility window title on macOS - #21462

Merged
deepak1556 merged 1 commit into
electron:masterfrom
jryans:mac-accessibility-title
Dec 10, 2019
Merged

deepak1556 merged 1 commit into
electron:masterfrom
jryans:mac-accessibility-title

Conversation

@jryans

@jryans jryans commented Dec 10, 2019 •

Copy link
Copy Markdown
Contributor

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 recently label Dec 10, 2019
@welcome

welcome Bot commented Dec 10, 2019

Copy link
Copy Markdown

💖 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
Copy Markdown
Member

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

@deepak1556

Copy link
Copy Markdown
Member

@codebytere can be verified with similar steps from #13722

@jryans

jryans commented Dec 10, 2019

Copy link
Copy Markdown
Contributor Author

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

@deepak1556 deepak1556 left a comment

Copy link
Copy Markdown
Member

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

deepak1556 commented Dec 10, 2019 •

Copy link
Copy Markdown
Member

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

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

welcome Bot commented Dec 10, 2019

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk

release-clerk Bot commented Dec 10, 2019

Copy link
Copy Markdown

Release Notes Persisted

Fixed accessibility window title on macOS

@trop

trop Bot commented Dec 10, 2019

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Dec 10, 2019

Copy link
Copy Markdown
Contributor

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

trop Bot commented Dec 10, 2019

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-pr 🌱 PR opened recently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants