react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Android: Lack of control of Nested Text locale (Android Span)

Open fabOnReact opened this issue 2 years ago • 1 comments

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

fabOnReact avatar Jan 12 '23 09:01 fabOnReact

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

fabOnReact avatar Jan 12 '23 09:01 fabOnReact

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[bot] avatar Jul 12 '23 05:07 github-actions[bot]

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

github-actions[bot] avatar Jul 19 '23 05:07 github-actions[bot]