Skip to content

accessibilityLabel does not work for Text component on iOS #14123

Closed
@curioustechizen

Description

@curioustechizen

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

  1. Create a new RN app using react-native init
  2. Edit index.ios.js
  3. Find the "Welcome to React Native" text and change it to
<Text testID={'welcome'} accessibilityLabel={'welcome'}>Welcome to React Native!</Text>
  1. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions