Skip to content

Fix group separators without regressing TalkBack navigation - #6163

Open
eliotcougar wants to merge 1 commit into
2dust:masterfrom
eliotcougar:codex/issue-6153-group-separators
Open

eliotcougar wants to merge 1 commit into
2dust:masterfrom
eliotcougar:codex/issue-6153-group-separators

Conversation

@eliotcougar

Copy link
Copy Markdown
Contributor

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

  • Keep the keyed LazyRow and its off-screen selected-item scrolling.
  • Draw a full-width divider beneath the group selector.
  • Draw the selected group's 3 dp indicator in the item draw pass so it remains visible above the divider.
  • Retain the existing Tab targets, selected state, profile counts, and stable group IDs.

Validation

  • :app:testPlaystoreDebugUnitTest
  • :app:compilePlaystoreDebugKotlin
  • :app:assemblePlaystoreDebug -PABI_FILTERS=x86_64
  • Installed the matching-signer APK on a Pixel 6a API 33 emulator.
  • Added enough temporary groups to force horizontal overflow; the accessibility UI tree exposed the group selector as scrollable, scrolling revealed off-screen groups, and activating QA_Group_04 marked it selected.
  • Confirmed the full-width divider and selected indicator visually and confirmed an empty crash buffer.
  • Enabled and bound TalkBack and verified accessibility focus. ADB-generated touch gestures bypass TalkBack, so they were not counted as full TalkBack gesture-traversal proof.

Follow-up to #6153.

@2dust

2dust commented Aug 30, 2026

Copy link
Copy Markdown
Owner

请注意,我们的 app 不是为了给有视觉障碍的人设计的。
如果用很小的代价能兼顾是可以接受的,但是如果为了给某些特定用途而引入大量的维护困难的代码是不可接受的。

@eliotcougar

Copy link
Copy Markdown
Contributor Author

请注意,我们的 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.

eliotcougar added a commit to eliotcougar/v2rayNG that referenced this pull request Aug 31, 2026
@eliotcougar

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants