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

feat: expose app accessibility status api #16119

Merged
merged 2 commits into from Dec 18, 2018
Merged

Conversation

codebytere
Copy link
Member

Description of Change

Resolves #16090.

Exposes an api through System Preferences allowing an app to determine whether or not it's been designated a trusted accessibility client, where that means an app that is allowed to modify the way users interact with their computer.

This API takes a prompt argument; if false is passed then the result will be returned silently, and if true is passed then a dialog (like the one below) will be shown.

screen shot 2018-12-17 at 8 32 33 pm

/cc @miniak @4ndv

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • relevant documentation is changed or added
  • PR title follows semantic commit guidelines
  • PR release notes describe the change in a way relevant to app-developers

Release Notes

Notes: Exposes an API to allow apps to determine their status as a trusted accessibility client.

@codebytere codebytere requested review from a team December 18, 2018 03:37
@miniak
Copy link
Contributor

miniak commented Dec 18, 2018

@codebytere you had a small bug in the code, passing @YES both when prompt was true and false. Fixed that + eliminated duplicate code as C++ bool can be used as Objective-C BOOL literal (https://clang.llvm.org/docs/ObjectiveCLiterals.html)

@codebytere
Copy link
Member Author

ah ok, i wasn't sure if objc bool literal could be coerced from c++ bools

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

LGTM

@jkleinsc jkleinsc merged commit a58d989 into master Dec 18, 2018
@release-clerk
Copy link

release-clerk bot commented Dec 18, 2018

Release Notes Persisted

Exposes an API to allow apps to determine their status as a trusted accessibility client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants