mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
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:
1 parent
d2b065f476
commit
a9a0268953
1 file changed
+1
+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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user