-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[a11y][iOS] Nested accessibility items inside Text not accessible #31298
Comments
This is a real problem and the same happens on Android too. (Edit: some work has been done here on Android b352e2d) We've had to work around it by detecting if the screen reader is active and if it is, swapping in interactive View-based blocks like This is an ugly workaround because it looks and reads like this:
...and it doesn't use any of the screenreader features or patterns for links users are used to, but at least it's (barely) usable. Please don't let this issue go stale again, team. |
@AlanSl I see the commit in your edit about the update on Android, and I see the changes in the react native node modules folder locally, but I cannot get nested links to be read on android Talk Back described in the commit. Has the latest android version broken these changes? Is anyone else able to get the screen reader to locate these links when nested in text components? |
@gp3gp3gp3 Last time I looked into this issue, I was getting weird behaviour where a It certainly seemed to me like the behaviour was not fixed, but rather, was now differently broken on each platform. However, I didn't look into it in depth, I just concluded that we weren't yet able to retire the hacky workaround described above. It's possible there was something I missed or overlooked. |
That is unfortunate. We also need nested text on press to be focusable with hardware keyboards. The new RN version includes the focusable prop, but these only exist on Views and not Text. |
+1 |
+1 |
Links should now be working in the new Fabric renderer.
links.mp4Images aren't currently supported, but the logic would be similar for supporting links, you'd just need to look for react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm Line 79 in 7b05b09
And add them as additional elements to the accessibilityElements array. |
@blavalla thanks mate, in which version was that fixed? is there "Fabric renderer" package, or is it within React Native? |
While nested talkback is a critically important feature, we also need to be able to focus on nested text with hardware keyboards. If the And of course as mentioned, would be great to have this on iOS as well. |
@gp3gp3gp3 thanks for the comment! Since you're highlighting something outside the scope of the original issue, we're going to close this one out but please go ahead and submit a new one with your insights. |
@alextait1 Happy to open a new issue for the focusable prop, but this issue is still valid, since for non fabric builds iOS is still not working for screenreader on nested text components. |
Description
Same as this issue #27147
Inline elements are not accessible.
Such element can be
<Text>This is a sentence, that has a <Text onPress={() => {}}>#hashtag</Text>, as well as a <Image /></Text>
. Example such as a tweet that has inline hashtags, mentions, etc.React Native version:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
<Text>This is a sentence, that has a <Text onPress={() => {}}>#hashtag</Text>, as well as a <Image /></Text>
Expected Results
There should be a way to make inline elements accessible. Looking at Twitter official client's example, these inline elements can be announced after reading through the full text.
Snack, code example, screenshot, or link to a repository:
In case this helpe, https://github.com/tooot-app/app/blob/main/src/components/Parse/HTML.tsx
The text was updated successfully, but these errors were encountered: