-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Feature] Announce Snackbar appearance to screen reader #437
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Did you identify how the app would fix the jankiness? If so we should make note of it in the implementation ticket.
I did not. It may involve changes on our end. There is a slightly different function, announceForAccessibilityWithOptions, which can make iOS queue up the announcement behind other screen reader behavior similar to how Android behaves. There's also settings for Android to be assertive and interrupt, but not sure how easily we can apply that to I have added a comment to the handoff ticket so they are on the lookout for it at least. |
Description of Change
Recognized the issue with the screen reader not reading the
announceForAccessibility
was only a problem in iOS and it appeared to be an issue due to the synchronous nature of the storybook test case so iOS was immediately refocusing the button at near enough the same time to not do theannounceForAccessibility
.Resolved by creating a useEffect on the Snackbar display that:
announceForAccessibility
was being triggered multiple times (on appearance and disappearance)Testing Packages
Screenshots/Video
iOS:
RPReplay_Final1723481022.MP4
Android:
Screen_Recording_20240812-125152_Expo.Go.mp4
Flagship iOS (somewhat janky from app-level focus that they'll need to address during implementation):
RPReplay_Final1723483670.MP4
Flagship Android (also somewhat janky in a different way from app-level focus that they'll need to address during implementation):
Screen_Recording_20240812-133427_VA.mp4
Testing
Tested it performs as expected in Storybook. Also tested flagship which was a bit janky, but due to app-level setting focus.
PR Checklist
Code reviewer validation:
changelog
label applied if it's to be included in the changelogPublish
While changes do warrant a new version per the versioning guidelines, postponed for later following functional changes to Snackbar.