Mark virtual text view descendants clickable

Summary:
Individual accessibility nodes for `ClickableSpan`s should themselves be clickable.

## Changelog:
[ANDROID] [FIXED] a11y: Mark virtual views for links as [`clickable`](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setClickable(boolean%29)

Reviewed By: twasilczyk

Differential Revision: D88426196

fbshipit-source-id: 81ee9dfef7a35916e90e5ee7f5985ca3ee7d9539
This commit is contained in:
Tom Scallon authored and meta-codesync[bot] committed 2025-12-05 14:51:17 -08:00
1 parent d2b065f476
commit a9a0268953
1 file changed
+1
@@ -219,6 +219,7 @@ internal class ReactTextViewAccessibilityDelegate(
node.contentDescription = accessibleTextSpan.description
node.addAction(AccessibilityNodeInfoCompat.ACTION_CLICK)
node.setBoundsInParent(bounds)
node.setClickable(true)
node.roleDescription = hostView.resources.getString(R.string.link_description)
node.className = AccessibilityRole.getValue(AccessibilityRole.BUTTON)
}