-
Notifications
You must be signed in to change notification settings - Fork 2
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
separating accessibilityUnit from accessibilityMinutes and accessibilityHours #4
base: tts-span-accessibility-unit-cpp-settings
Are you sure you want to change the base?
separating accessibilityUnit from accessibilityMinutes and accessibilityHours #4
Conversation
This reverts commit 252e6f4.
|
## Summary Adds the accessibilityUnit to fabric CPP API (part of PR facebook#35130 Adding support for Android Accessibility TtsSpan API) The TtsSpan API now supports verbatim, date, and fraction but may not work with other span types like phone numbers, currency, time, measure, and money. An explanation of the use case is as follows: - Time is spelled 1 0 3 0 instead of ten thirty - The developer does not have the option to specify if 10m stands for 10 meters or 10 miles, or 10 minutes - Phone numbers, for example, 33312344, are not yet supported Implementing the above functionality requires adding a new prop to the react-native API responsible for managing attributes of nested Text. - Java and CPP TextAttributes manage the functionality. - Nested Text does not correspond to a Widget on Android but an Android TextView Span. The spans are updated based on a caching mechanism that re-renders the Android TextView only if specific attributes are updated. The updates are triggered only if the Text or Paragraph Text attributes change. - An example of Text attributes is accessibilityRole, font-weight, and backgroundColor. - An example of Paragraph attributes is textBreakstrategy. They are updated with different mechanisms because they may change the paragraph layout. These mappings are configured in Java, CPP, and Javascript. As this and PR [facebook#33468](facebook#33468) require changes to the text attributes, the below work was needed: - issue documented in PR [facebook#33468 (comment)](facebook#33468 (comment)) and PR [facebook#35130 (comment)](facebook#35130 (comment)). The CPP changes for facebook#35130 are moved to a separate PR ([fabriziobertoglio1987#2](#2)). The RNTester App would crash without a clear stack trace on startup after making changes to CPP. This was later fixed by adding the CPP headers to the prefab library rrc_view (see this [comment](facebook#35130 (comment))). - Adding the CPP configurations (see [fabriziobertoglio1987#2](https://github.com/fabriziobertoglio1987/react-- native/pull/2)) required extensive troubleshooting and analysis Related: PR #4 - separating accessibilityUnit from accessibilityMinutes and accessibilityHours
The changes will crash the app at startup with the following stack trace
Related: facebook#35130 (comment) (was solved by modyfing the file and then running the artifacts)
Related PR #3
This functionalities will be part of future PR
full log