Skip to content

TalkBack, 8 of 10: Improve shared navigation and action labels - #6166

Open
eliotcougar wants to merge 13 commits into
2dust:masterfrom
eliotcougar:fix/accessibility-navigation-labels
Open

eliotcougar wants to merge 13 commits into
2dust:masterfrom
eliotcougar:fix/accessibility-navigation-labels

Conversation

@eliotcougar

@eliotcougar eliotcougar commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Improve the accessible names and navigation order of shared controls in part 8 of the TalkBack series.

  • Read the normal top-bar title before its navigation button, using Material's existing traversal group. Search keeps its native text-input behavior.
  • Hide decorative drawer branding from accessibility navigation while retaining native destination selection and dismissal.
  • Give Menu and the service button localized action labels. Their existing click callbacks, roles, and accessible names remain intact.
  • Name App Picker's overflow button, localize Clear search, and clarify Copy log to clipboard in all ten supported catalogs.

The title modifier changes traversal order without requesting accessibility focus. Native onClick semantics receive a label with a null action, so the existing IconButton and FloatingActionButton callbacks still own activation. Server-row and group-tab semantics remain in #6167; connection-test feedback remains in #6168.

Synced by merging upstream 2.3.15 (57907cf354) without rewriting branch history. Review confirmed that upstream's subscription infinity/RTL rendering and native/configuration changes remain intact. The shared bottom bar was also inspected after merge simulations with #6168; both service-action labeling and test-status suppression survive.

Validation at 4902ccd46:

  • Play Store and F-Droid JVM tests: 124 and 124 passed, respectively; no failures, errors, or skips.
  • Both debug Kotlin compilations, ARM64 APK assemblies, and full lint tasks passed with zero lint errors.
  • XML, duplicate-key, placeholder, and upstream-preservation checks passed in ten catalogs, covering 40 localized feature entries. git diff --check passed.
  • Native inputs match upstream AndroidLibXrayLite v26.10.31 and HEV 2.19.3. All four input ABIs were checked; the validation APKs package all three required ARM64 native libraries.

Not run: device/emulator TalkBack, semantics-tree, speech, touch/keyboard/D-pad, recreation/IME, or theme/locale/layout matrix checks on this synced revision. No ADB target is available and an existing QEMU process has unresolved ownership. Compilation and lint do not establish runtime accessibility behavior.

Place page titles first within each top-app-bar traversal group, hide redundant drawer branding, and provide localized names for clear-search, App Picker More, and Logcat clipboard actions.
@eliotcougar eliotcougar changed the title TalkBack, 8 of N: Improve shared navigation and action labels TalkBack, 8 of 10: Improve shared navigation and action labels Aug 30, 2026
@eliotcougar
eliotcougar marked this pull request as ready for review August 30, 2026 17:44
@aliRahimi1997

Copy link
Copy Markdown
Contributor

I tested PR #6166 on a real device with TalkBack enabled.

Most of the shared navigation and action labels work correctly. I found two issues in the navigation drawer:

  1. Initial accessibility focus

When the navigation drawer is opened, TalkBack initially places accessibility focus on a node that speaks nothing. I have to swipe once before the first actual navigation item is announced.

Ideally, when the drawer opens, accessibility focus should start on the first meaningful navigation item rather than on a silent/non-actionable node, if this can be achieved using the standard Android/Compose accessibility mechanisms.

  1. Navigation item role

The navigation items are announced with "Tab" at the end. For example:

"Settings, tab"
"Per-app proxy, tab"

The items otherwise work correctly.

Could you please check whether this "Tab" role is actually the intended semantic role for these NavigationDrawerItem entries, or whether it is being introduced by the accessibility changes in this PR?

I am intentionally not suggesting a custom TalkBack announcement or manually manipulating accessibility focus. I would prefer to preserve the native semantic contract and fix the underlying semantics/structure if necessary.

Other shared action labels in this PR worked correctly in my testing.

@eliotcougar

Copy link
Copy Markdown
Contributor Author

I will address the first issue. However, the second one has to stay. Tab is the default role of the Navigation drawer items. I intentionally did not override the roles anywhere in the new implementation.

@eliotcougar
eliotcougar marked this pull request as draft August 31, 2026 09:30
The branding text was already hidden, but its non-interactive Material Surface remained exposed as a silent accessibility stop. Hide that container as well while preserving the existing text exclusion, native drawer dismissal, item roles, and visual layout. No focus requests or locale-specific labels are introduced.

Add a device regression test for hidden branding/header semantics and the native dismiss action. It fails on the previous APK and passes with the fix on API 30. All 57 unit tests and Play Store debug assembly pass. Not run: spoken TalkBack traversal, because TalkBack is not installed on the emulator.
@eliotcougar
eliotcougar marked this pull request as ready for review August 31, 2026 12:07
aliRahimi1997 added a commit to aliRahimi1997/v2rayNG that referenced this pull request Aug 31, 2026
Set a state-dependent native click label on the existing start/stop floating action button. TalkBack can describe double-tap Connect or Disconnect while retaining the existing accessible button name, native button semantics and MainAction.ToggleService dispatch.

Add concise translations in all nine existing locale catalogs. Do not add a second action, custom announcement, focus request or service lifecycle change.

Validation: 57 Play Store debug JVM tests, compilation and app/test APK assembly; focused button/drawer emulator tests and the nine-test combined main-screen suite. The button test verifies both labels, stable accessibility focus and unchanged accessibility-click, touch, Enter, Space and D-pad activation, waiting for asynchronous native action metadata updates. Not run: listening verification in every locale.
The localized service action label and its onClick import were inserted at the same locations as the connection-test PR live region and semantic imports, causing conflicts despite independent behavior.

Relocate only those two existing lines into unchanged blocks. Keep the native FAB callback, Connect/Disconnect label, and all connection-test semantics intact without copying features between the focused PRs.

Validation: standalone and paired Play Store JVM tests and Kotlin compilation pass; all 45 branch pairs merge in both orders with identical trees. The ten-PR stack also merges textually in both orders; its separate upstream routing-deletion API mismatch remains outside this fix. No runtime behavior or test files changed.
Give the existing Menu button a localized native click-action label without replacing its callback or role. Rely on Material 3 TopAppBar to provide its traversal group and keep only the lower title traversal index, preserving title-first ordering and the import boundary with the per-app accessibility branch.

Remove the two permanent Android-test files from this focused contribution. Preserve their scenarios and unpublished test edits as external local QA. Leave both drawer hiding modifiers and the bottom-bar placement that avoids Part 10 conflicts unchanged.

Validation: 57 JVM tests, Play Store debug compilation and x86_64 assembly passed. A TalkBack-enabled emulator check confirmed title-before-navigation traversal links on six screens, native Menu action labeling, accessibility/touch/Enter/Space/D-pad activation, drawer hiding and dismissal, search clearing, and App Picker overflow naming. These native-tree and input checks do not claim recorded TalkBack speech.
Retain focused toolbar traversal, decorative drawer hiding, and native action labels on current Compose components. Leave connection-test feedback and server-list behavior to their owning PRs.
@eliotcougar
eliotcougar marked this pull request as ready for review September 21, 2026 11:32
Resolve shared-resource conflicts without dropping feature-specific semantics or current upstream translations. Retain upstream service and UI updates, and migrate feature regression tests to the upstream JUnit Platform setup.

Validation: PlaystoreDebug JVM suite, Kotlin compilation and APK assembly passed. All declared ABIs contain the current Xray library and both HEV libraries. Full device and OEM lifecycle regression coverage was not run.
Retain localized navigation actions, service connect/disconnect labels, search clearing, title traversal order and hidden decorative drawer content. Complete the four changed feature strings in the maintained Azerbaijani catalog while preserving upstream pill group navigation.

Playstore 113 JVM tests, Kotlin compilation and x86_64 debug assembly passed. All three required native libraries are packaged. Preserve upstream subscription usage/header capture, pill group navigation and Kotlin/Gradle updates. Runtime accessibility, input, persistence and restoration checks were not run because device access is reserved for the parent.
Place this feature's translated resources near their owning screens and align shared action resources across the TalkBack set. Every resource entry, value, attribute, placeholder and plural item is unchanged; catalogs remain in the existing strings.xml files. This avoids same-location insert conflicts, including the newly supported Azerbaijani locale and Bakhtiari catalog.

Exact-entry XML preservation, duplicate-key and whitespace checks pass. Full JVM/Kotlin/APK checks passed before this content-neutral catalog relocation; the final committed-tree build checks follow separately.
eliotcougar added a commit to eliotcougar/v2rayNG that referenced this pull request Oct 22, 2026
…n-labels

Integrate the verified current PR tip 57fae85 onto upstream 01b4630. Keep the focused branch unchanged and the integration local-only.
eliotcougar added a commit to eliotcougar/v2rayNG that referenced this pull request Nov 2, 2026
Integrate the published fix/accessibility-navigation-labels head 4902ccd after its upstream compatibility review. Preserve the focused PR history and its latest fixes.
Apply the localized connect and disconnect actions to the new floating control without changing its layout or service dispatch.
Use the same localized semantic label for the drawer button and connection knob. Keep the knob label independent of the connection-status accessibility changes.
eliotcougar added a commit to eliotcougar/v2rayNG that referenced this pull request Nov 14, 2026
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