Repository navigation
TalkBack, 6 of 10: Improve per-app proxy accessibility - #6164
eliotcougar wants to merge 12 commits into
Conversation
Expose the header options and each app row as one native control, add localized routing context without package IDs, and replace the transient information toast with a readable dialog.
…essibility Retain the original button call site and name the existing modal-opening callback locally. This avoids an adjacent-hunk conflict between the independent modal replacement in 2dust#6157 and the switch semantics in this PR, without changing behavior or importing notification code.
|
I tested PR #6164 on a real device with TalkBack enabled. The two Switch controls in the per-app proxy screen expose their current state correctly when TalkBack navigates to them. However, after toggling either Switch, TalkBack does not immediately announce the new On/Off state. To hear the updated state, I have to navigate away from the Switch and then return to it. I observed the same behavior with the Switch controls in PR #6161, so this may be a shared issue with the toggle semantics rather than something specific to the per-app proxy screen. Could you please check whether the native Compose/Material Switch semantics can expose the updated state after the toggle while preserving the native Switch role, state, and action? I am not suggesting a custom announcement or manual accessibility-focus manipulation; the goal is simply for the semantic state change to be exposed correctly to the accessibility service. Apart from this, I did not observe any other accessibility problems with the two per-app proxy Switches. |
Retain one native toggleable row with a passive child switch or checkbox. Expose the two switches' observed checked state through stateDescription so Compose sends the STATE_DESCRIPTION event required for immediate feedback on the tested TalkBack 17 / Compose UI 1.11.4 combination. Keep app names stable and move checked state plus routing context into stateDescription instead of changing the accessible label after a toggle. Preserve native roles, package-ID hiding and every enabled/bypass routing combination. Update all nine locale catalogs without splitting resources. No custom announcements or focus manipulation are added. Add native-event tests for both switch directions, app checkbox feedback in all four enabled/bypass combinations, one action target and pointer, Enter, Space and D-pad input. Validation: 60 Play Store debug unit tests passed; app and androidTest APKs assembled; both PerAppToggleFeedbackTest cases passed on the Android 37.1 Pixel 9 Pro emulator with TalkBack 17 enabled. Checked/routing feedback was observed in TalkBack output. Physical-device gestures and pronunciation in every locale were not tested.
|
One small usability observation about the Per-App Proxy checkboxes: TalkBack currently announces an item like: "Checked. routed through the app. WhatsApp Business. Tick box." From a real-world TalkBack navigation perspective, I find this order less natural because the app name is announced only after the state and description. Would it be possible for the checkbox semantics to expose the app name as the primary label, so TalkBack can naturally announce it more like: "WhatsApp Business. Checked. routed through the app. Tick box." |
I was thinking about it too. I don't really know why Android does it like that, but there is no real control over it. It is always "State - Name - Role", in this order only. Changing it requires rebuilding everything manually and removing the semantics. TalkBack will see a list of some items, but it will not be aware that they are checkboxes, or whether they are checked or unchecked. They will be just clickable items that say something when selected and do something when double-tapped. |
In this example it's like this. The only way I see here is to attach "routed through the app" to the name. Which goes against intended meaning of State and Name. |
Adopt the overlapping terminology corrections from PR 2dust#6169 and carry them into branch-only plural and accessibility resources. This keeps later merge resolution from restoring stale Bakhtiari wording.
Derive accessibility routing context from the service mode, complete installed-app snapshot, and resolved UIDs instead of checkbox state alone. Preserve the different VPN and root empty-selection rules, own-package exclusions, shared UIDs, and missing-package behavior without changing routing policy. Keep one native toggle target per row, merge the app-name Text naturally, and retain the Material control footprint after making the child controls inert. Remove the synthetic Android test harness and keep focused JVM coverage for the routing decision table. Validation: 70 JVM tests, including 13 per-app routing tests; Play Store debug compilation and x86_64 assembly; native accessibility-tree and state-change checks with TalkBack enabled on API 37.1, including touch, Enter, Space, and D-pad activation. Exact TalkBack audio and root traffic forwarding were not recorded.
Reuse the merged help dialog without duplicating its implementation. Preserve the parent-owned native toggles and configured routing descriptions, and leave the unrelated camera translation at its upstream value.
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 native checkbox/switch semantics, stable package identities and UID-aware descriptions for VPN, root and proxy-only routing, including shared UIDs and selection fallbacks. Add the eight feature translations to the maintained Azerbaijani catalog and preserve upstream mode behavior. Playstore 126 JVM tests, Kotlin compilation and x86_64 debug assembly passed; Fdroid 126 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-per-app-controls head 13a2707 after its upstream compatibility review. Preserve the focused PR history and its latest fixes.
Summary
Make each per-app row one native checkbox and each Enable/Bypass control one native switch. The parent owns checked state and activation; visual child controls have null callbacks. Keep package IDs visible but hidden from accessibility speech, and keep the information dialog across recreation.
Describe configured app inclusion from the full installed-app snapshot, even when the visible list is filtered. Account for shared UIDs, the app's own UID, VPN allow/bypass behavior, empty or removed selections, root mode, and proxy-only mode. These descriptions represent configured inclusion, not a live connection or packet-routing measurement.
Reviewed the model against the current VPN builder and root UID policy after merging upstream 2.3.15. The generic app picker keeps the same shared row contract. Both distributions are validated because their application IDs differ.
Validation
Validated at
13a2707624f462a3cab627dc8554754d40aaba0eon 2026-11-02:PerAppAccessibilityTest: 13 tests passed.git diff --check: passed.All eight changed string keys pass XML and placeholder checks in all ten declared locale catalogs. Official AndroidLibXrayLite v26.10.31 and HEV 2.19.3 inputs match their source pins; both arm64 APK packaging checks cover all three required native files.
Not run: emulator/device TalkBack speech and semantics, focus retention, touch/keyboard/D-pad activation, rotation, persistence through the real UI, runtime VPN/root traffic, and the generic-picker/theme/layout matrix. No available ADB target; the existing VM's ownership is unresolved, so no emulator was started or stopped. Release and other APK ABIs were not built.