react-native
react-native copied to clipboard
Android: Lack of control of Nested Text locale (Android Span)
Description
Originally part of https://github.com/facebook/react-native/issues/30849
Can not specify the locale (language) of a Nested Text (Android Span). TalkBack uses the information when announcing the text.
If the device language is English, TalkBack reads the text in that language.
iOS has the accessibilityLanguage property, but there is no equivalent android API.
React Native version:
main branch
Expected Behavior
An implementor should be able to specify the type of content within a span of text to give additional context to the TalkBack screenreader (for ex. English, Japanese or Italian).
Snack
https://snack.expo.dev/ovzKvjHdy
Version
main
Output of npx react-native info
Not Relevant. It is an issue with ReactAndroid API (main branch)
Steps to reproduce
- Open the snack
- Enable talkback
- Move the talkback screenreader focus on the Japanese text
Snack, code example, screenshot, or link to a repository
https://snack.expo.dev/ovzKvjHdy
I found this info:
- LocaleSpan https://developer.android.com/reference/android/text/style/LocaleSpan
- TextView.textLocale
https://youtu.be/x-FcOX6ErdI?t=288 https://github.com/facebook/react-native/pull/35130
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.
This issue was closed because it has been stalled for 7 days with no activity.