Skip to content

fix(a11y): label unnamed controls, follow Reduce Motion, check translation format specifiers - #57

Merged
Quost merged 4 commits into
mainfrom
fix/accessibility-labels-motion
Nov 24, 2026
Merged

Quost merged 4 commits into
mainfrom
fix/accessibility-labels-motion

Conversation

@Quost

@Quost Quost commented Nov 23, 2026

Copy link
Copy Markdown
Owner

What changes

Accessibility and translation-check fixes from the codebase audit.

  • Every switch, pop-up and field now has a spoken name. 10 Toggle(""), 22 Picker("") and 2 TextField("") controls were read by VoiceOver as just "switch" or "pop-up button". Each now takes the text shown next to it as its label, for example the rule's summary, the module name or "Trigger". .labelsHidden() stays, so nothing changes visually. The two text fields use .accessibilityLabel instead, so no placeholder text appears. There are 8 new strings, each with en/de/es/zh.
  • Reduce Motion is followed. Nothing checked it before, against ~35 animation sites. There are new motion(_:) and withMotion(_:_:) helpers in Theme.swift, which give no animation when Reduce Motion is on. They wrap 29 sliding, spring and expanding animations (notch, panels, segmented controls, rings, onboarding). Short hover fades and live level meters are left as they are.
  • Rows that act on click are exposed as buttons. Clipboard rows, palette results, memory and recording cards, and the Menew window cards used .onTapGesture only. They now get .isButton and an accessibility action that does the same thing.
  • The app menu's "Edit" was English-only. It now uses L("Editar").
  • ACCESSIBILITY.md: removes the outdated menu bar label caveat (the item is named "Menew") and documents Reduce Motion.
  • scripts/check-l10n.py:
    • It reads files as UTF-8, so it also runs on Windows.
    • It now checks that the printf specifiers in every translation (%d, %@, %.1f, positional %1$@ …) match the Portuguese key. A mismatch crashes String(format:) at runtime. No existing mismatches were found.

Notes for review

  • Written on a machine that can't build Swift. CI is the first compile.
  • The custom toggle rows (ActionsView, Onboarding, Theme) are unchanged: they already contain a real Toggle, now labelled, and an extra button trait would give VoiceOver two elements per row.

Checklist

  • Builds with ./build.sh and I tried the change in the app. (CI builds it. Worth a quick VoiceOver pass and a look with Reduce Motion on)
  • python3 scripts/check-l10n.py passes (1979 texts)
  • Every new UI string uses L("…") with en, de, es and zh
  • No telemetry, no new network calls and no new dependencies

🤖 Generated with Claude Code

@Quost
Quost merged commit 4fd0ea0 into main Nov 24, 2026
12 checks passed
@Quost
Quost deleted the fix/accessibility-labels-motion branch November 24, 2026 04:53
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.

1 participant