AccessibilityInfo allows you to query the current state of accessibility features and register to be notified when they change.
Methods
isScreenReaderEnabled()
- Promise that resolves to
truewhen a screen reader is enabled,falseotherwise
isBoldTextEnabled()
- Promise that resolves to
truewhen bold text is enabled,falseotherwise - On Android, always resolves to
false
isGrayscaleEnabled()
- Promise that resolves to
truewhen grayscale is enabled,falseotherwise
isInvertColorsEnabled()
- Promise that resolves to
truewhen invert colors is enabled,falseotherwise
isReduceMotionEnabled()
- Promise that resolves to
truewhen reduce motion is enabled,falseotherwise
isReduceTransparencyEnabled()
- Promise that resolves to
truewhen reduce transparency is enabled,falseotherwise - On Android, always resolves to
false
isHighTextContrastEnabled()
- Promise that resolves to
truewhen high text contrast is enabled,falseotherwise
isDarkerSystemColorsEnabled()
- Promise that resolves to
truewhen darker system colors are enabled,falseotherwise
prefersCrossFadeTransitions()
- Promise that resolves to
truewhen cross-fade transitions are preferred,falseotherwise
isAccessibilityServiceEnabled()
- Promise that resolves to
truewhen any accessibility service is enabled,falseotherwise
addEventListener()
'screenReaderChanged': Screen reader state changed'reduceMotionChanged': Reduce motion setting changed
'boldTextChanged': Bold text setting changed'grayscaleChanged': Grayscale setting changed'invertColorsChanged': Invert colors setting changed'reduceTransparencyChanged': Reduce transparency setting changed'announcementFinished': Screen reader finished an announcement'darkerSystemColorsChanged': Darker system colors setting changed
'highTextContrastChanged': High text contrast setting changed'accessibilityServiceChanged': Accessibility service state changed
EventSubscriptionwith aremove()method
announceForAccessibility()
announcement: The string to be announced
announceForAccessibilityWithOptions()
announcement: The string to be announcedoptions:queue(iOS only): Queue announcement behind existing onespriority(iOS only):'high': Interrupts ongoing speech, cannot be interrupted'default': Interrupts ongoing speech, can be interrupted'low': Won’t interrupt, can be interrupted
sendAccessibilityEvent()
handle: Reference to a host componenteventType: Type of event to send'focus': Set accessibility focus'click': Announce click (Android only)'viewHoverEnter': Announce hover (Android only)'windowStateChange': Announce window change (Android only)
getRecommendedTimeoutMillis()
originalTimeout: Your default timeout in milliseconds
- Promise that resolves to the recommended timeout
Complete Example
Best Practices
- Respect reduce motion: Disable or simplify animations when
isReduceMotionEnabled()returns true - Announce important changes: Use
announceForAccessibility()for dynamic content updates - Test with screen readers: Enable VoiceOver (iOS) or TalkBack (Android) during development
- Adjust timeouts: Use
getRecommendedTimeoutMillis()on Android for dismissible messages - Handle events: Listen to accessibility changes and update your UI accordingly