Closed
Description
Description
Continuing the discussion from #13648 (comment), for <Text>
component on iOS, the actual label of the text always overrides the testID
and accessibilityLabel
Reproduction Steps and Sample Code
- Create a new RN app using
react-native init
- Edit index.ios.js
- Find the "Welcome to React Native" text and change it to
<Text testID={'welcome'} accessibilityLabel={'welcome'}>Welcome to React Native!</Text>
- Run this app on an iOS simulator and inspect it with Accessibility Inspector
Expected: The Accessibility Inspector should say the Label is welcome
.
Actual: The Accessibility Inspector says the Label is Welcome to React Native!
.
Note: - with the same set of properties on Android the contentDescription
is welcome
which is what I expect.
Additional Information
- React Native version: 0.44.0
- Platform: iOS 10.1 Simulator
- Development Operating System: Mac OSX 10.11.6
- Dev tools: XCode 8.1, Accessibility Inspector 5.0