Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2de042f2 authored by Wenbo Jie's avatar Wenbo Jie
Browse files

[DocsUI M3 a11y] Hide toolbar when selection bar shows

When selection bar shows, it completely covers the original toolbar,
but the original toolbar still respond to the tab focus and Talkback.
If both bars have buttons in the same location, the button actually
focused is the button user sees (e.g. the button on the toolbar is
focused but the selection bar covers the toolbar, users assume the
button on the selection bar is focused). We should only show one bar
and hide the other one in any circumstances.

Note: ActionModeController (which handles selection bar for pre-M3)
has a similar logic but it uses setImportantForAccessibility()
instead of the visibility show/hide, which somehow doesn't work with
the search bar (i.e. the search bar inside the app bar still gets
the focus even if the app bar has
IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS), that's why
visibility solution is chosen eventually.

Check the attached bug for the demo.

Bug: 439514402
Test: m DocumentsUIGoogle && tab navigation with selected files
Flag: com.android.documentsui.flags.use_material3
Change-Id: Idd83f45467860f86a9e2ec5f0ad50d07859c3924
parent 49afeb9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment