Repository navigation
Conversation
On Android, `focusable={false}` doesn't stop a view from taking keyboard
focus while it is `accessible`, and `Pressable` is accessible by default,
so a closed FAB.Menu's items were Tab stops on views that draw nothing.
They are now not accessible while collapsed. On Android their scroll view
doesn't scroll while collapsed either: Android focuses a scrollable view
itself when none of its children can take focus.
This branch has not been deployed
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.
Motivation
With a hardware keyboard on Android, Tab stopped on a closed
FAB.Menu's invisible items before it reached the trigger. While the menu is closed, its items and their scroll container are now out of the keyboard focus order, so Tab goes straight to the trigger.Related issue
Fixes #5343
Screenshots / Videos
No rendering change: the collapsed items draw nothing either way. Only the Tab stops on them go away.
Test plan
In the example app on an Android emulator (API 36) with keyboard key events, FAB example in Menu mode:
mainit first stops three times on invisible views at the item positions.main.