Skip to content

UI audit pass: accessibility, Back handling, touch targets, contrast - #26

Merged
gabrielbr merged 4 commits into
mainfrom
ccr-392895c5-0n02ne
Oct 20, 2026
Merged

gabrielbr merged 4 commits into
mainfrom
ccr-392895c5-0n02ne

Conversation

@gabrielbr

Copy link
Copy Markdown
Owner

Summary

A code-level UI audit using the impeccable (native Android audit, scored against Material 3) and ui-ux-pro-max (priority rules + Jetpack Compose guidance) skills. The full report, scores and open items are in docs/ui-audit-2026-10.md. The GMind brand (dark-only, Ubuntu Mono, mint accent, frame) was treated as the brief, not as a finding.

Before: 11/20 (Acceptable). Accessibility 1, Performance 3, Theming 3, Platform conformance 2, Adaptivity 2.

Systemic

  • textMuted changes from #7C7B82 to #8E8D94. That brings all 182 uses to 4.5:1 or better on card/cardSoft (it was 4.1 / 3.7).
  • Switch rows are now one toggleable control (Modifier.switchRow, Role.Switch). TalkBack reads the label along with the state, and the label is tappable. About 24 sites.
  • rememberReduceMotion(): looping animations stop when Remove animations is on.

Platform

  • Back handling for onboarding steps, dashboard edit mode and the live workout (it confirms before leaving). The breathing session now saves on exit.
  • Permissions:
    • The app asks once per launch instead of on every resume, where a dismissed dialog reopened itself.
    • Coarse location is requested alongside fine, since Android 12+ ignores a fine-only request.
    • Pairing, onboarding and the barcode scanner handle a denial with an Open settings option.
  • Confirmations before Forget Ring, meal and drink deletes, Strava disconnect, and coach memory delete.
  • IME padding on the settings sub-screens.
  • Workout pause/resume/finish no longer call runBlocking on the main thread. They run on LiveWorkoutManager's own scope and drop re-entrant taps, so Finish can't credit a workout twice or cancel the Strava upload.

Accessibility and layout

  • Labels: icon-only buttons have labels, and the bottom-nav labels are no longer read twice.
  • Selection state: selectable/toggleable semantics on chips, segmented controls and radio rows.
  • Spoken summaries for charts, gauges, activity rings, the sleep stage bar and the hypnogram.
  • Live regions for measurement results and coach errors.
  • Touch targets: 48dp on the edit badges, coach buttons, period chevrons, chips and text links.
  • Text: 9–10sp data labels raised, and the DEEP stage label moved off the 2.4:1 indigo.
  • Adaptivity:
    • The Today grid uses 3 columns from 600dp.
    • Buttons use heightIn so large font scales don't clip.
    • The Log Meal dialog and the workout-type picker scroll.

Also removes the unused MeasurementModal.kt, a zero-height landscape status-bar strip whose insets were already consumed by MainActivity, and ignores .kotlin/.

Visible changes to check

  • The Sleep and Vitals segmented controls are taller (48dp).
  • Some chips have more vertical room.
  • The muted grey is slightly lighter.

Testing

  • :app:compileDebugKotlin passes.
  • :app:testDebugUnitTest: 1653 of 1656 pass. The 3 failures fail identically on main:
    • MealJournalTest ×2 (caffeine detection)
    • ResponsesHttpTest.testUnresolvableHostRetriesThenFailsAsTransport
  • Not yet run on a device or emulator. Worth a pass with TalkBack, at 1.3× font scale, and with Remove animations on.

Generated by Claude Code

Audit run with the impeccable (native Android audit) and ui-ux-pro-max skills;
findings and scores are in docs/ui-audit-2026-10.md.

Systemic:
- textMuted #7C7B82 -> #8E8D94: 4.5:1 on card and cardSoft (was 4.1 / 3.7).
- Switch rows are one toggleable control (Modifier.switchRow, Role.Switch), so
  TalkBack reads the label with the state and the label is tappable.
- rememberReduceMotion(): looping animations hold still under Remove animations.

Platform:
- BackHandler for onboarding steps, dashboard edit mode, the live workout
  (confirm before leaving) and the breathing session (which now saves on exit).
- Permissions: ask once per launch instead of on every resume (a dismissed
  dialog reopened itself); request coarse location with fine; Pairing,
  onboarding and the barcode scanner handle denial with Open settings.
- Confirm before Forget Ring, meal/drink delete, Strava disconnect and coach
  memory delete. IME padding on settings sub-screens.
- runBlocking removed from workout pause/resume/finish.

Accessibility:
- Labels on icon-only buttons (workout Back/Edit/Delete, duration steppers,
  drink steppers, nav tabs no longer read twice); selectable/toggleable
  semantics on chips, segmented controls and radio rows; spoken summaries for
  charts, gauges, activity rings, the sleep stage bar and the hypnogram;
  live regions for measurement and coach errors.
- 48dp touch targets on edit badges, coach buttons, period chevrons, chips,
  text links; 9-10sp data labels raised; DEEP stage label off the 2.4:1 indigo.

Adaptivity: Today grid goes to three columns from 600dp; buttons use
heightIn so large font scales don't clip; Log Meal and record pickers scroll.

Removes the unused MeasurementModal.
- Workout pause/resume/finish run on LiveWorkoutManager's own scope. The
  record screen's scope was cancelled when finishing popped the route, which
  could drop the Strava auto-upload; a double tap could also finish twice
  and credit the workout's minutes and distance twice. The finishedSessionId
  effect alone navigates to the summary now, and Back with no session leaves.
- Onboarding: after a Bluetooth denial, "Try again" re-checks the grant, so
  allowing it in Settings leads back to pairing instead of a dead end.
- Today grid: pad short rows to the column count, so a lone tile keeps its
  width instead of stretching.
DrinksUi.kt conflicted with the Drinks rework (#25). Took main's screen and
re-applied the audit's fixes to it: Pill and the tab Segments announce their
selection (radio / tab, in selectable groups), the stepper's −/+ name what
they change, deleting a recent drink asks first and the icon names the drink,
the 3-question check uses one selectable 48dp row per answer, and card titles,
stepper notes and recent-drink lines go from 11 to 12sp.
@gabrielbr
gabrielbr merged commit 70193f2 into main Oct 20, 2026
1 check passed
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