Fix group separators without regressing TalkBack navigation - #6163
eliotcougar wants to merge 1 commit into
Conversation
|
请注意,我们的 app 不是为了给有视觉障碍的人设计的。 |
TalkBack incompatibility is not the only issue with the old tab-row code. LazyRow also makes scroll-to tab-ID simpler when using "locate profile" (the roll-back probably broke the locate profile, but I didn't check), it is easier to style, and it is in agreement with the official Android UI guidance. I'm refactoring my old TalkBack code at the moment. It should be a lot less complicated and mostly limited to ensuring the UI elements have proper semantic properties and associated localized resources. |
|
One additional thing I noticed: adding semantics to UI makes automated app testing a lot easier. Robots can use the semantic tree to direct their actions more precisely than when they have to rely on screenshots and tap coordinates. |
Why
Issue #6153 reported that the Compose group selector no longer provided enough visual separation between subscription groups. Commit 3dc0173 restored the divider and selected indicator by switching the selector back to ScrollableTabRow.
That solves the visual regression, but it also restores the accessibility problem addressed by #6105: TalkBack could not navigate to groups outside the visible tab-row viewport. The keyed LazyRow was introduced because its lazy collection exposes the scrolling semantics needed to reach off-screen groups.
The visual distinction and accessible navigation are independent concerns. The separator should therefore be restored without replacing the lazy collection.
What changed
Validation
:app:testPlaystoreDebugUnitTest:app:compilePlaystoreDebugKotlin:app:assemblePlaystoreDebug -PABI_FILTERS=x86_64QA_Group_04marked it selected.Follow-up to #6153.