Repository navigation
Stop routing TalkBack's click to removed accessibility actions on Android - #59076
Open
YevheniiKotyrlo wants to merge 1 commit into
Open
YevheniiKotyrlo wants to merge 1 commit into
YevheniiKotyrlo wants to merge 1 commit into
Conversation
Contributor
Author
YevheniiKotyrlo
marked this pull request as ready for review
October 14, 2026 14:12
…roid A view whose accessibilityActions declared activate kept dispatching it on TalkBack's click after the actions were removed or replaced with an empty list, so the view's own click never ran. setAccessibilityActions returned before writing the tag when the prop was null, and ReactAccessibilityDelegate routed an action through a map of every action it had built node info with, never dropping one. setAccessibilityActions now writes null to the tag, and the delegate resolves an action against the view's current accessibilityActions.
YevheniiKotyrlo
force-pushed
the
fix/android-removed-accessibility-actions
branch
from
October 16, 2026 10:12
c9b7c00 to
2e2da47
Compare
This branch has not been 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.


Summary:
A view that declared an
activateaction keeps taking TalkBack's click after itsaccessibilityActionsare removed or replaced with[]: the double-tap dispatchesonAccessibilityActionwithactivate, and the view's own click, such as aPressable'sonPress, never runs. Two places keep the removed action.BaseViewManager.setAccessibilityActionsreturns before writing the tag when the prop isnull, so the previous array stays on the view, andReactAccessibilityDelegate.performAccessibilityActionroutes throughaccessibilityActionsMap, which records every action it built node info with and never drops one.This writes the
nullthrough, and the delegate resolves an incoming action against the view's currentaccessibilityActionsinstead of the map, so a declared action is routed as before and a removed one falls through to the view's own handling.Changelog:
[ANDROID] [FIXED] - Removing or emptying
accessibilityActionsno longer leaves TalkBack's click on the removed actionTest Plan:
New cases in
BaseViewManagerTestsetaccessibilityActionsthrough the view manager, build the node info as TalkBack does, and perform an accessibility click. Before the change three fail: the click is not performed after theactivateaction is removed, nor after the actions are replaced with[](expected:<1> but was:<0>), and a removed custom action is still in the node info. A declaredactivatetakes the click with and without the change. With it,./gradlew :packages:react-native:ReactAndroid:testDebugUnitTest -PenableWarningsAsErrors=truepasses (760 tests), andcompileReleaseKotlinandcompileReleaseJavaWithJavacpass with the same flag; the rest ofbuild_androidwas not run.RNTester with TalkBack on an Android 16 emulator, before and after: after a button's
activateaction is removed, the double-tap dispatchesonAccessibilityActionwithout the change, and runsonPresswith it.