Content-Length: 271959 | pFad | http://github.com/facebook/react-native/pull/49379/commits/c20a849fcc8854a480eefa73d50e7b00ecd3883a

77 Fix issue where state updating text to remove link would break TalkBack by joevilches · Pull Request #49379 · facebook/react-native · GitHub
Skip to content
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

Fix issue where state updating text to remove link would break TalkBack #49379

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix issue where state updating text to remove link would break TalkBack
Summary: Whenever we remove a link in some text we do not properly update the accessibility delegate to respond to this change. As a result we still think that there are nodes to access around the spans

Differential Revision: D69551906
  • Loading branch information
joevilches authored and facebook-github-bot committed Feb 12, 2025
commit c20a849fcc8854a480eefa73d50e7b00ecd3883a
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,13 @@ public void updateExtraData(ReactTextView view, Object extraData) {
// delegate so that these can be picked up by the accessibility system.
ReactClickableSpan[] clickableSpans =
spannable.getSpans(0, update.getText().length(), ReactClickableSpan.class);

if (clickableSpans.length > 0) {
view.setTag(
R.id.accessibility_links,
new ReactTextViewAccessibilityDelegate.AccessibilityLinks(clickableSpans, spannable));
ReactTextViewAccessibilityDelegate.Companion.resetDelegate(
view, view.isFocusable(), view.getImportantForAccessibility());
}
view.setTag(
R.id.accessibility_links,
clickableSpans.length > 0
? new ReactTextViewAccessibilityDelegate.AccessibilityLinks(clickableSpans, spannable)
: null);
ReactTextViewAccessibilityDelegate.Companion.resetDelegate(
view, view.isFocusable(), view.getImportantForAccessibility());
}
}

Expand Down
Loading








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/facebook/react-native/pull/49379/commits/c20a849fcc8854a480eefa73d50e7b00ecd3883a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy