SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Fixup focusability logic of PreparedLayoutTextView (#51508)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51508

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

fbshipit-source-id: 05e17f4eb8d5d79ed1d84458f6d5fc6d1571e382
J
Joe Vilches committed
d87790846bfcacae30810803fb1f5d18a8129406
Parent: 0f73a7a
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 5/23/2025, 5:42:37 PM