Repository navigation
[APP-3834] Backport react-native#59748: stop Content Capture rebuilding accessibility subtrees - #12354
Draft
mozzius wants to merge 2 commits into
Draft
[APP-3834] Backport react-native#59748: stop Content Capture rebuilding accessibility subtrees#12354mozzius wants to merge 2 commits into
mozzius wants to merge 2 commits into
Conversation
…ubtrees APP-3834 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Contributor
4 of 11 tasks
arcalinea
temporarily deployed
to
samuel/app-3834-backport-rn-59748 - social-app PR #12354
November 8, 2026 09:06 — with
Render
Destroyed
Android builds react native from source in every build since #12024. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mozzius
force-pushed
the
samuel/app-3834-backport-rn-59748
branch
from
November 8, 2026 09:07
911c763 to
6e51a5d
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports react/react-native#59748 (react/react-native#59748), which fixes the UI-thread stalls described in react/react-native#59743 (react/react-native#59743).
What happens. On Pixels running Android 16 and 17, Content Capture builds an
AccessibilityNodeInfoon the UI thread for every view that appears. This happens even with no accessibility service on; every app gets a session through Android's scam detection.Why RN makes it expensive. For RN views, each of those calls lands in
ReactAccessibilityDelegate.getTalkbackDescription. That function initializes each child's node, then calls itself withnull, which builds and initializes the same node again, all the way down. The cost grows exponentially with nesting depth.Measured cost.
The fix is one line: pass the node the loop already initialized.
createNodeInfoFromViewis exactlyobtain()plusonInitializeAccessibilityNodeInfo, the same thing the loop just did.getTalkbackDescriptioncopies the node it's given and never recycles it, so the descriptions don't change.Notes:
patches/react-native/pr-59748-1e10181fc9.patch.mdhas the removal TODO.patch_hashand the peer-suffix hashes derived from it. No versions changed.Test plan
getTalkbackDescriptionrecursion should be gone from the Content Capture path.🤖 Generated with Claude Code