Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextInput accessibilityValue is ignored on iOS #29981

Closed
jychiao opened this issue Sep 18, 2020 · 6 comments
Closed

TextInput accessibilityValue is ignored on iOS #29981

jychiao opened this issue Sep 18, 2020 · 6 comments
Labels
Accessibility Team - Evaluated Accessibility Component: TextInput Related to the TextInput component. Needs: Attention Issues where the author has responded to feedback. Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@jychiao
Copy link

jychiao commented Sep 18, 2020

Description

Using a TextInput with an accessibilityValue and value, I find that in iOS only the value is read aloud and accessibilityValue is ignored. For example:

<TextInput accessibilityValue={text: "read me instead"} value={"value"}/> would read "Value" instead of "Read me instead"

React Native version:

0.63.2

Expected Results

I expect the accessibilityValue takes precedence, as I am able to do in other types of Views. I think I was able to see it behave as expected in Android, but it could've been coincidence.

@react-native-bot react-native-bot added Component: TextInput Related to the TextInput component. Platform: iOS iOS applications. labels Sep 18, 2020
@chrisglein chrisglein added Accessibility Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. and removed Needs: Triage 🔍 labels Sep 22, 2020
@github-actions
Copy link

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@react-native-bot react-native-bot removed the Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. label Sep 22, 2020
@jeswinsimon
Copy link
Contributor

This is working as intended. From the UIKit Documentation:

Text fields are accessible by default. The default accessibility trait for a text field is User Interaction Enabled.

The accessibility values are automatically inferred as per the accessibility attributes for UIControl.

@jychiao
Copy link
Author

jychiao commented Mar 2, 2021

Sorry for my delayed response. I understand your point as to why the value is the default accessibility announcement for a text field. However, my understanding of accessibilityValue is as defined in the RN documentation, and it nicely provides another option for providing extra a11y information on your view. In our case we are trying to use it to announce if your input value has validations, since there is currently no more appropriate role available.

We can easily work around this, but I am curious as to why this wouldn't be considered a bug when it conflicts with what is outlined in documentation (and behaves as I expected in Android).

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Mar 2, 2021
@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jul 24, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@EmiloTypo
Copy link

Any updates on this? We would also like to use accessibilityValue on a TextInput. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Team - Evaluated Accessibility Component: TextInput Related to the TextInput component. Needs: Attention Issues where the author has responded to feedback. Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

6 participants