You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AccessibilityInfo api exposes enough information for most apps to do OK with regards to accessible design; however, the core system has two main issues
Clunky Interface
The boolean getter functions of isXYZ (and the differently named prefersCrossFadeTransitions) only provide async access to the value for a single render. If developers want their app to remain in sync with the system settings, they must use the event listener to maintain that state themselves.
Instead, the API should expose this info through hooks, such as useBoldTextEnabled(), or usePreferesCrossFadeTransitions(), simplifying consumer code. I previously documented this idea in #869.
Missing flags
The API currently is missing the following accessibility flags from iOS:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The AccessibilityInfo api exposes enough information for most apps to do OK with regards to accessible design; however, the core system has two main issues
Clunky Interface
The boolean getter functions of
isXYZ
(and the differently namedprefersCrossFadeTransitions
) only provide async access to the value for a single render. If developers want their app to remain in sync with the system settings, they must use the event listener to maintain that state themselves.Instead, the API should expose this info through hooks, such as
useBoldTextEnabled()
, orusePreferesCrossFadeTransitions()
, simplifying consumer code. I previously documented this idea in #869.Missing flags
The API currently is missing the following accessibility flags from iOS:
accessibilityAssistiveAccessEnabled
accessibilityDimFlashingLights
accessibilityDifferentiateWithoutColor
accessibilityLargeContentViewerEnabled
accessibilityPlayAnimatedImages
accessibilityQuickActionsEnabled
accessibilityShowButtonShapes
accessibilitySwitchControlEnabled
And for Android, it is missing:
isAudioDescriptionRequested
isHighContrastTextEnabled
Implementation details
On iOS, each of those has their own "
DidChangeNotification
" types that can be used the same way react native currently handles.On Android, an
AccessibilityServicesStateChangeListener
can be used to drive hooks and sync system state.Beta Was this translation helpful? Give feedback.
All reactions