accompanist
accompanist copied to clipboard
[insets-ui] topBar slot in Scaffold comes after content slot in Talkback ordering
Since the topBar
is placed visually above the rest of the main content in the custom Scaffold
implementation, it's expected that it would come before the content
when navigating with Talkback. However, this is not the case: the body content is navigated to first, and then the topBar
. This appears to be due to the semantic sorting logic here: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsSort.kt;l=130;drc=627183600bfd9920c47bd26bdfe5ec906b54d2a7
Since both the topBar
and content
are placed in the same location, the tiebreaker that eventually resolves the issue is the height of the two slots. Since content
is taller than topBar
, it wins the tiebreaker, and comes first.
Configuring that order doesn't seem to be possible in any way current, as that is an outstanding feature request: https://issuetracker.google.com/issues/186443263