Repository navigation
fix(iOS): apply accessibility props to the indicator in ActivityIndicator - #59381
Open
faciledictu wants to merge 1 commit into
Open
faciledictu wants to merge 1 commit into
faciledictu wants to merge 1 commit into
Conversation
…ator The accessibility props of ActivityIndicator went to the host view, which is not an accessibility element, so VoiceOver read the inner UIActivityIndicatorView with its default label. Return the indicator from accessibilityElement, as RCTSwitchComponentView does for UISwitch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzPpDcGNgvkkyMFtCXhLDi
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #59380.
On iOS, the accessibility props of
ActivityIndicator(accessibilityLabel,aria-label, …) go to the host view, which is not an accessibility element, so VoiceOver reads the innerUIActivityIndicatorViewwith its default label "In progress".This change returns the indicator from
accessibilityElementand makes the host view not an element, the same wayRCTSwitchComponentViewdoes forUISwitch.RCTViewComponentViewapplies each accessibility prop only when it changes, so an indicator without accessibility props keeps its default label, value and traits.Changelog:
[IOS] [FIXED] -
ActivityIndicatorusesaccessibilityLabeland the other accessibility propsTest Plan:
react-native0.88.0 and React Native built from source (RCT_USE_PREBUILT_RNCORE=0), Accessibility Inspector on an iOS 27.0 simulator. Before: D (accessibilityLabel="Loading D") reads "In progress". After: Label "Loading D", Value "1", classUIActivityIndicatorView, so the indicator's value is kept.aria-label) is the same until fix: map aria-* props in Switch, ScrollView and ActivityIndicator #59379 lands, which mapsaria-labeltoaccessibilityLabel.clang-format --checkon the changed file: no changes.