refactor: make accessibilitySupportEnabled a property on app (#17362)

* refactor: make accessibilitySupport a prop on app

* fix docs

* update spec
This commit is contained in:
Shelley Vohr 2019-04-04 19:49:04 -07:00 committed by GitHub
parent 11699d8611
commit 9c3cb55ef2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 56 additions and 36 deletions

View file

@ -1150,6 +1150,8 @@ technologies, such as screen readers, has been detected. See
https://www.chromium.org/developers/design-documents/accessibility for more
details.
**[Deprecated Soon](modernization/property-updates.md)**
### `app.setAccessibilitySupportEnabled(enabled)` _macOS_ _Windows_
* `enabled` Boolean - Enable or disable [accessibility tree](https://developers.google.com/web/fundamentals/accessibility/semantics-builtin/the-accessibility-tree) rendering
@ -1161,6 +1163,8 @@ This API must be called after the `ready` event is emitted.
**Note:** Rendering accessibility tree can significantly affect the performance of your app. It should not be enabled by default.
**[Deprecated Soon](modernization/property-updates.md)**
### `app.showAboutPanel` _macOS_ _Linux_
Show the app's about panel options. These options can be overridden with `app.setAboutPanelOptions(options)`.
@ -1337,6 +1341,16 @@ Sets the `image` associated with this dock icon.
A `Menu` property that return [`Menu`](menu.md) if one has been set and `null` otherwise.
Users can pass a [Menu](menu.md) to set this property.
### `app.accessibilitySupportEnabled` _macOS_ _Windows_
A `Boolean` property that's `true` if Chrome's accessibility support is enabled, `false` otherwise. This property will be `true` if the use of assistive technologies, such as screen readers, has been detected. Setting this property to `true` manually enables Chrome's accessibility support, allowing developers to expose accessibility switch to users in application settings.
See [Chromium's accessibility docs](https://www.chromium.org/developers/design-documents/accessibility) for more details. Disabled by default.
This API must be called after the `ready` event is emitted.
**Note:** Rendering accessibility tree can significantly affect the performance of your app. It should not be enabled by default.
### `app.isPackaged`
A `Boolean` property that returns `true` if the app is packaged, `false` otherwise. For many apps, this property can be used to distinguish development and production environments.

View file

@ -5,9 +5,7 @@ The Electron team is currently undergoing an initiative to convert separate gett
## Candidates
* `app` module
* `accessibilitySupport`
* `badgeCount`
* `applicationMenu`
* `name`
* `dock`
* `badge`
@ -56,3 +54,7 @@ The Electron team is currently undergoing an initiative to convert separate gett
* `audioMuted`
## Converted Properties
* `app` module
* `accessibilitySupport`
* `applicationMenu`