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

Android: Date, time, numbers lack control of readback details

Open amarlette opened this issue 4 years ago • 2 comments

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.

amarlette avatar Feb 03 '21 22:02 amarlette

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

fabOnReact avatar Oct 28 '22 19:10 fabOnReact

  • [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

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 Nov 04 '23 05:11 github-actions[bot]

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

github-actions[bot] avatar Nov 11 '23 05:11 github-actions[bot]

PR was not merged, could add it as separate library

fabOnReact avatar Jan 17 '24 08:01 fabOnReact