(BETA) Provides access to accessibility options provided by the operating system. More...
Import Statement: | import ArcGIS.AppFramework.Platform 1.0 |
Properties
- boldText : BoldTextStatus
- highContrast : HighContrastStatus
- textScale : var
- voiceOver : VoiceOverState
Detailed Description
The Accessibility component detects the accessibility options of the operating system that the app is running on. This can be used to change the behavior of your app based on operating system-level options.
This component is a singleton, and does not need to be instantiated.
The following table describes which features are supported on which platforms.
Feature | Android | iOS | Windows | macOS | Linux |
---|---|---|---|---|---|
Voice Over | Yes | Yes | No | No | No |
Bold text | No | Yes | No | No | No |
Font scale | Yes | No | Yes | No | No |
High contrast | No | Yes | Yes | No | No |
This code sample demonstrates an example usage of the Accessibility component, displaying the component's proeprties as derived from the device. If the device doesn't support an accessibility element, it will return -1, 0 if the device supports the element but isn't currently using it, and 1 if the element is supported and in use. In the case of fontScale, it will show a value reflecting how large the text is, with 1 representing 100% of normal text size.
App { id: app width: 400 height: 640 ColumnLayout { anchors.fill: parent Row { Layout.fillWidth: true Layout.alignment: Qt.AlignCenter Layout.margins: 15 spacing: 20 Text { width: parent.width / 2 text: "Voice Over" } Text { width: parent.width / 2 text: Accessibility.voiceOver } } Row { Layout.fillWidth: true Layout.alignment: Qt.AlignCenter Layout.margins: 15 spacing: 20 Text { width: parent.width / 2 text: "Bold Text" } Text { width: parent.width / 2 text: Accessibility.boldText } } Row { Layout.fillWidth: true Layout.alignment: Qt.AlignCenter Layout.margins: 15 spacing: 20 Text { width: parent.width / 2 text: "High Contrast" } Text { width: parent.width / 2 text: Accessibility.highContrast } } Row { Layout.fillWidth: true Layout.alignment: Qt.AlignCenter Layout.margins: 15 spacing: 20 Text { width: parent.width / 2 text: "Font Scale" } Text { width: parent.width / 2 text: Accessibility.textScale } } } }
Enumerations
VoiceOverState enumeration
Enum describing the status of voiceover usage on your device. Informs the voiceOver property.
Name | Value |
---|---|
Accessibility.VoiceOverStateUnknown | -1 |
Accessibility.VoiceOverStateStopped | 0 |
Accessibility.VoiceOverStateRunning | 1 |
BoldTextStatus enumeration
Enum describing the status of bold text usage on your device. Informs the boldText property.
Name | Value |
---|---|
Accessibility.BoldTextStatusUnknown | -1 |
Accessibility.BoldTextStatusDisabled | 0 |
Accessibility.BoldTextStatusEnabled | 1 |
HighContrastStatus enumeration
Enum describing the status of high contrast usage on your device. Informs the highContrast property.
Name | Value |
---|---|
Accessibility.HighContrastStatusUnknown | -1 |
Accessibility.HighContrastStatusDisabled | 0 |
Accessibility.HighContrastStatusEnabled | 1 |
Property Documentation
Checks if the operating system is currently using bold text for easier readability. Informed by the BoldTextStatus enum.
This functionality is only used by iOS devices.
Checks if the operating system is currently using a high contrast interface for easier readability. Informed by the HighContrastStatus enum.
This functionality is only used by iOS devices.
Returns a value representing how much the operating system is scaling text on the device, and by how much, for ease of readability.
This functionality is only used by Android devices.
Checks if the operating system is currently using voiceover for visually-impaired users. Informed by the VoiceOverStatus enum.
This functionality is only used by iOS and Android devices.