Repository navigation
TalkBack, 8 of 10: Improve shared navigation and action labels - #6166
eliotcougar wants to merge 13 commits into
Conversation
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.
|
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:
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.
The navigation items are announced with "Tab" at the end. For example: "Settings, 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. |
|
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. |
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.
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.
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.
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.
Improve the accessible names and navigation order of shared controls in part 8 of the TalkBack series.
The title modifier changes traversal order without requesting accessibility focus. Native
onClicksemantics receive a label with a null action, so the existingIconButtonandFloatingActionButtoncallbacks 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:git diff --checkpassed.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.