Skip to content

Fix Android FlatList accessibility collection positions#57008

Open
popsiclelmlm wants to merge 1 commit into
facebook:mainfrom
popsiclelmlm:codex/30973-flatlist-a11y-position
Open

Fix Android FlatList accessibility collection positions#57008
popsiclelmlm wants to merge 1 commit into
facebook:mainfrom
popsiclelmlm:codex/30973-flatlist-a11y-position

Conversation

@popsiclelmlm
Copy link
Copy Markdown

Summary:

Fixes #30973.

On Android, FlatList and VirtualizedList now provide accessibility collection metadata so TalkBack can report collection positions for rendered items. FlatList sets list/grid collection info, attaches collection item data to rendered item roots, and the Android scroll delegate resolves visible item ranges from nested tagged descendants.

Changelog:

[ANDROID] [FIXED] - Fix FlatList accessibility collection position announcements.

Test Plan:

  • PATH=/Users/liumin/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH ./node_modules/.bin/jest packages/react-native/Libraries/Lists/__tests__/FlatList-test.js --runInBand
  • PATH=/Users/liumin/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH ./node_modules/.bin/jest packages/virtualized-lists/Lists/__tests__/VirtualizedList-test.js --runInBand
  • PATH=/Users/liumin/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH YARN_BINARY=/Users/liumin/.cache/node/corepack/v1/yarn/1.22.22/bin/yarn ./gradlew :packages:react-native:ReactAndroid:testDebugUnitTest --tests com.facebook.react.views.scroll.ReactScrollViewAccessibilityDelegateTest -Preact.internal.useHermesStable=true
  • PATH=/Users/liumin/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH YARN_BINARY=/Users/liumin/.cache/node/corepack/v1/yarn/1.22.22/bin/yarn ./gradlew :packages:react-native:ReactAndroid:ktfmtCheck -Preact.internal.useHermesStable=true
  • ./node_modules/.bin/prettier --check packages/react-native/Libraries/Lists/FlatList.js packages/react-native/Libraries/Lists/__tests__/FlatList-test.js packages/react-native/ReactNativeApi.d.ts packages/virtualized-lists/Lists/VirtualizedList.d.ts packages/virtualized-lists/Lists/VirtualizedList.js packages/virtualized-lists/Lists/VirtualizedListCellRenderer.js packages/virtualized-lists/Lists/VirtualizedListProps.js
  • git diff --check

@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 31, 2026

Hi @popsiclelmlm!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@github-actions
Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

@popsiclelmlm
Copy link
Copy Markdown
Author

Hi @popsiclelmlm!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

retry check

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 31, 2026
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 31, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Position in Collection not supported by Flatlist

1 participant