React Clickable Span
This class is used in TextLayoutManager to linkify and style a span of text with accessibilityRole="link". This is needed to make nested Text components accessible.
For example, if your React component looks like this:
<Text>
Some text with
<Text onPress={onPress} accessible={true} accessibilityRole="link">a link</Text>
in the middle.
</Text>
Content copied to clipboard
then only one ReactTextView will be created, for the parent. The child Text component does not exist as a native view, and therefore has no accessibility properties. Instead, we have to use spans on the parent's ReactTextView to properly style the child, and to make it accessible (TalkBack announces that the text has links available, and the links are exposed in the context menu).