Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Support for Entrance/exit from collection by Flatlist #31630

Conversation

anaskhraza
Copy link
Contributor

Summary

Issue #30964 .When using a screen reader, flatlist does not announce entrance/ exit from the flat list.

Changelog

[Android] [Changed] - Added support for accessibility role of "list" for flatlist and sectioned list

Test Plan

I have added accessibility role prop in flatlist and sectioned list in rntester app, that will announce entrance/ exit from flatlist and sectioned list.

@facebook-github-bot facebook-github-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 29, 2021
@anaskhraza anaskhraza changed the title Accessibility/flatlist announcement Added Support for Entrance/exit from collection by Flatlist May 29, 2021
@analysis-bot
Copy link

analysis-bot commented May 29, 2021

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 52a9fed

@amarlette amarlette linked an issue Jun 3, 2021 that may be closed by this pull request
@amarlette amarlette requested a review from kacieb June 3, 2021 22:01
@amarlette
Copy link

Thank you @anaskhraza for this Pull Request! I've gotten you on the Improved React Native Accessibility board and added a reviewer.

@@ -135,6 +136,8 @@ public static String getValue(AccessibilityRole role) {
return "android.widget.SpinButton";
case SWITCH:
return "android.widget.Switch";
case LIST:
return "android.widget.ListView";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll want to make this "android.widget.AbsListView.class" to match Talkback's internal implementation here:

https://github.com/google/talkback/blob/f5d564fdc915a74d8cde4868608f307de9ccf957/utils/src/main/java/com/google/android/accessibility/utils/Role.java#L380

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 9,153,650 +37
android hermes armeabi-v7a 8,687,312 +36
android hermes x86 9,594,572 +37
android hermes x86_64 9,562,698 +30
android jsc arm64-v8a 10,797,994 +99
android jsc armeabi-v7a 9,722,928 +108
android jsc x86 10,834,325 +107
android jsc x86_64 11,443,967 +109

Base commit: 52a9fed

Copy link
Contributor

@blavalla blavalla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the fix!

@facebook-github-bot
Copy link
Contributor

@blavalla has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@blavalla merged this pull request in 25a1612.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entrance/exit from collection Not supported by Flatlist
5 participants