react-native
react-native copied to clipboard
Android: Date, time, numbers lack control of readback details
Description
Formatting for date, time, numbers lack of any way to specify the type of content presented for the TTS engine. Without some sort of metadata, TTS engines will do their best to guess as to what to announce, which often is incorrect. For example 10m might be 10 minutes, 10 meters, or 10 miles.
React Native version:
v0.63
Expected Behavior
An implementor should be able to specify the type of content within a span of text to give additional context to the TTS engine. This context should be take into account when announcing this content.
Snack
https://snack.expo.io/p4tHQ-QOj
Android Details
On Android, the TTSSpan class is meant to give extra metadata to text-to-speech engines about the type of content. This class includes various options for things like numbers, distances, time, etc. These should be available as an option on the <Text> component so that you can specify the type of content this text is meant to represent.
I tested the implementation in react-native. I will complete the implementation tomorrow. (Enable the audio in the video)
https://user-images.githubusercontent.com/24992535/198718311-26793481-b307-4542-88a8-7cfa4d299fd0.mp4
- [x] Moved Android: Lack of control of Nested Text locale (Android Span) to https://github.com/facebook/react-native/issues/35813
- [x] Added to the accessibility board https://github.com/facebook/react-native/projects/15
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.
PR was not merged, could add it as separate library