You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixup focusability logic of PreparedLayoutTextView (#51508)
Summary:
For now, we are opting to not auto-focus `PreparedLayoutTextViews` if they have links. The reason being this would not work well with Text nested in a View which is also accessible. If that Text had links, and was set to focusable, then TalkBack would individually focus that Text, which users may not want.
So this diff removes that link detection, and fixes up accessibility in general. Since this isn't a TextView, we need to explicitly set the `text` on the `AccessibilityNodeInfo` object in the delegate so TalkBack know what to annouce.
In the future we aim to bring back auto-focusing with links, but only if a screen reader is not on, so that keyboard users can benefit from this.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D75103779
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewAccessibilityDelegate.kt
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -174,6 +174,15 @@ internal class ReactTextViewAccessibilityDelegate : ReactAccessibilityDelegate {
0 commit comments