feat(a11y): transfer accessible property to BottomSheet's children #2191
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.
Transfer accessible property to Bottom Sheet's children in order to improve keyboard navigation and VoiceOver / TalkBack results.
Motivation
When fixing some accessibility features like keyboard navigation in our application, I discovered that some parts of the Bottom Sheet are accessible when you use, for instance, the keyboard tabulation. The consequence is users can be lost because the selected element in UI is not visible nor pertinent. Same for blind or visual impaired people who use VoiceOver / TalkBack, the smartphone says thinks like "Bottom Sheet" or "Bottom Sheet Handle", which may be not pertinent to browse the app.
In that case, the main property "accessible" from the Bottom Sheet props may be transferred to its children if we need to enable or disable the accessibility. We only changed components we use and must be updated with the accessible property to fix our app.
Thus, in our app, we instantiate several Bottom Sheets, so we have to disable all hidden sheets and only enable the one which is opened. If we don't do that, keyboard tabulation goes through all Bottom Sheets even they are not visible.