Accessibility QML Type

(BETA) Provides access to accessibility options provided by the operating system. More...

Import Statement: import ArcGIS.AppFramework.Platform 1.0

Properties

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.

FeatureAndroidiOSWindowsmacOSLinux
Voice OverYesYesNoNoNo
Bold textNoYesNoNoNo
Font scaleYesNoYesNoNo
High contrastNoYesYesNoNo

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.

NameValue
Accessibility.VoiceOverStateUnknown-1
Accessibility.VoiceOverStateStopped0
Accessibility.VoiceOverStateRunning1

BoldTextStatus enumeration

Enum describing the status of bold text usage on your device. Informs the boldText property.

NameValue
Accessibility.BoldTextStatusUnknown-1
Accessibility.BoldTextStatusDisabled0
Accessibility.BoldTextStatusEnabled1

HighContrastStatus enumeration

Enum describing the status of high contrast usage on your device. Informs the highContrast property.

NameValue
Accessibility.HighContrastStatusUnknown-1
Accessibility.HighContrastStatusDisabled0
Accessibility.HighContrastStatusEnabled1

Property Documentation

[read-only] boldText : BoldTextStatus

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.


[read-only] highContrast : HighContrastStatus

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.


[read-only] textScale : var

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.


[read-only] voiceOver : VoiceOverState

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.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.