Skip to content

Commit a9a0268

Browse files
Tom Scallonmeta-codesync[bot]
authored andcommitted
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
1 parent d2b065f commit a9a0268

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewAccessibilityDelegate.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ internal class ReactTextViewAccessibilityDelegate(
219219
node.contentDescription = accessibleTextSpan.description
220220
node.addAction(AccessibilityNodeInfoCompat.ACTION_CLICK)
221221
node.setBoundsInParent(bounds)
222+
node.setClickable(true)
222223
node.roleDescription = hostView.resources.getString(R.string.link_description)
223224
node.className = AccessibilityRole.getValue(AccessibilityRole.BUTTON)
224225
}

0 commit comments

Comments
 (0)