forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRAFT CPP solution to pass static string as accessibilityUnit
getOrCreateSpannableForText is not called. The method is called on the parent Text, but not on the Span Text. Review implementation of accessibilityRole in [BaseViewManager](https://github.com/fabriziobertoglio1987/react-native/blob/ec4bc8eb5905f81cebbb4b623acda8245ee5683c/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java#L247) and [ReactMapBufferPropSetter.kt](http://www.apple.com/) Probably the method setAccessibilityRole is called directly from kotlin MapBufferPropSetter Add required changes and debug the functionality accessibilityRole link is called, but time is not they have the same cpp configuration, but one of them is not invoked in BaseViewManager. This suggest missing configs from the [accessibility link PR](facebook@7b5b114), maybe accessibilityRole Link is triggered with resetAccessibilityDelegate Find logic in accessibility link PR that resets the Delegate Before resetting the Delegate, TextLayoutManager adds the Span to the Text. The field is TextAttributes mIsAccessibilityLink. This field is set to true if accessibilityRole = link mIsAccessibilityLink is set to true in the ReactBaseTextShadowNode #setIsAccessibilityLink sets the value Debug the value of ReactBaseTextShadowNode #setAccessibilityUnit Verify if accessibilityUnit is retrieve in that method, because this manager is also for nested text Check if setIsAccessibiltyLink also is triggered for role time, if not understand why text does not trigger. Yes, it is triggered. We set there the accessibilityRole - We could follow the same implementation, we add the span based on mIsAccessibilityTtsSpan - We retrieve get spans of class ReactTtsSpan - We follow same implementation from accessibilityLinks Implement same logic for accessibilityRole time Verify accessibilityRole time is invoked Use resetAccessibilityDelegate to add accessibilityUnit info to child Text Copy missing changes from another prop (for ex. accessibilityRole). setAccessibilityRole is triggered, while setAccessibilityUnit is not triggered. Review missing diff with [#2](https://github.com/fabriziobertoglio1987/react-native/pull/2/files) Review the current diff with main branch Add breakpoint in cpp SOLUTION: adding the value in [attributedstring/conversion.h](https://github.com/fabriziobertoglio1987/react-native/blob/ec4bc8eb5905f81cebbb4b623acda8245ee5683c/ReactCommon/react/renderer/attributedstring/conversions.h#L1087) will then pass it to [TextAttributesProps as key 24](https://www.icloud.com/iclouddrive/0b8-oKB396zP7Astpyc3puGqQ#ACC_UNIT_passed_as_key_24)
- Loading branch information
1 parent
ec4bc8e
commit a96ad8a
Showing
7 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters