AccessibilityInfo
Sometimes it’s useful to know whether or not the device has a screen reader that is currently active. TheAccessibilityInfo API is designed for this purpose. You can use it to query the current state of the screen reader as well as to register to be notified when the state of the screen reader changes.
Vega Support
In order to properly use this module, the target Vega applications needs to includecom.amazon.devconf.privilege.accessibility privilege in the manifest.toml file.
Implemented Methods
addEventListener
Use theAccessibilityInfo.addEventListener to listen for accessibility events, such as when a screen reader is turned on or off. This helps developers make their apps more accessible by responding dynamically to user settings.
Supported events
Sample usage reference
announceForAccessibility
Trigger an accessibility announcement for screen reader. It programmatically announces the specified message to notify users of important changes in the app’s UI, such as status updates or alerts. The announcement does not associate with a specific UI element and is best for general notifications.Sample usage reference
announceForAccessibilityWithOptions
It extends the functionality ofannounceForAccessibility by allowing developers to customize the behavior of announcements like waiting for existing announcements to complete before announcing a new message.
Sample usage reference
Accepted values
true in the options object.
isScreenReaderEnabled
Query whether a screen reader is currently enabled. Returns a promise which resolves to a boolean. The result is true when a screen reader is enabled and false otherwise.Sample usage reference
isHighTextContrastEnabled Android Vega
Query whether high text contrast is currently enabled. Returns a promise which resolves to a boolean. The result is true when high text contrast is enabled and false otherwise.

