Skip to content

Fixup focusability logic of PreparedLayoutTextView #51508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

joevilches
Copy link
Contributor

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]

Differential Revision: D75103779

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels May 21, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75103779

joevilches added a commit to joevilches/react-native that referenced this pull request May 22, 2025
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]

Differential Revision: D75103779
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75103779

joevilches added a commit to joevilches/react-native that referenced this pull request May 22, 2025
Summary:
Pull Request resolved: facebook#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]

Differential Revision: D75103779
@joevilches joevilches force-pushed the export-D75103779 branch 2 times, most recently from c967b5c to 7b82a10 Compare May 23, 2025 16:48
joevilches added a commit to joevilches/react-native that referenced this pull request May 23, 2025
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
Summary:
Pull Request resolved: facebook#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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75103779

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in d877908.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 23, 2025
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @joevilches in d877908

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants