Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Feature Request]: Expose macOS accessibility preferences #27910

Copy link
Copy link
@inukshuk

Description

@inukshuk
Issue body actions

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

Apps on macOS often use the vibrancy effect. Electron allows us to enable the effect on BrowserWindow via the options and setVibrancy. Users can disable this effect globally via the Accessibility Preferences (reduce transparency). When this preference is active, the respective Electron APIs to enable vibrancy will have no effect, which is good, but in order to style an app properly, following Apple's HID guidelines, it is often required to know whether or not this effect is enabled. I don't think it's currently possible to tell if that's the case, using the Electron API.

We have access to NSUserDefaults via systemPreferences.getUserDefault() but I believe it only offers access to the 'Apple Global Domain'. Additionally, some accessibility preferences can be queried via the nativeTheme module.

Proposed Solution

Add nativeTheme.shouldReduceTransparency() analogously to nativeTheme.shouldUseInvertedColorScheme().

Alternatives Considered

Alternatively, add a BrowserWindow.prototype.getVibrancy() and return null if the effect is disabled (i.e., you could try to set a value via setVibrancy() and then check if the effect was applied or not).

Another alternative would be to allow to arbitrarily query the 'com.apple.universalaccess' domain or allow to pass a domain to systemPreferences.getUserDefault().

Additional Information

Current workaround would be to spawn a process and call defaults read com.apple.universalaccess reduceTransparency.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.