fix(accessibility): preserve inverted TalkBack order#2383
Open
maxwellyoung wants to merge 1 commit into
Open
Conversation
Author
|
I have signed the CLA! |
Author
|
CLA is green now. @naqvitalha, when you have a moment, could you approve the first-time-contributor |
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.
Description
Android TalkBack traverses inverted FlashLists in the opposite direction from their visual order because the list and its cells are visually inverted with transforms while the native accessibility hierarchy keeps the original child order.
This adds an Android-only accessibility container that reverses only the children exposed through
addChildrenForAccessibilitywhen the list is inverted. Render order, layout, transforms, touch handling, and recycling remain unchanged. The JavaScript component falls back to a regularViewwhen the native manager is unavailable, so an existing binary does not crash before its next native rebuild.Fixes #2381
Reviewers' hat-rack 🎩
Please focus on the Android native view manager and whether accessibility-only child enumeration is the right boundary. The native container delegates unchanged for regular lists and performs one linear reversal only when Android requests accessible children from an inverted list.
Screenshots or videos
Verified with TalkBack on a Pixel 7 API 34 emulator using React Native 0.84:
Test plan
yarn test --forceExit— 188 tests)yarn type-check)yarn lint)yarn build):shopify_flash-list:assembleDebug)View