Repository navigation
Clear the previous accessibilityState on Android - #59840
Open
faciledictu wants to merge 1 commit into
Open
faciledictu wants to merge 1 commit into
faciledictu wants to merge 1 commit into
Conversation
setViewState only applied the keys of the new state, so "mixed", "busy", checked, selected and expanded from an earlier state stayed after the state changed or was removed. It now rebuilds the content description on every change and clears what the new state no longer has.
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:
Fixes #44960.
setViewStateonly applies the keys of the new state, so parts of the old one stay: "mixed" aftercheckedbecomestrueorfalse, "busy" afteraria-busyis removed, and checked, selected and expanded after the whole state is removed.It now rebuilds the content description on every change and clears what the new state no longer has.
Changelog:
[ANDROID] [FIXED] - Changing or removing
accessibilityStateno longer leaves the old "mixed", "busy", checked, selected or expanded stateTest Plan:
Added tests to
BaseViewManagerTest; they fail onmainand pass with this change. Checked on Android with https://github.com/faciledictu/rn-a11y-state-reset-repro: each view updated in place now matches the same view mounted again.