Skip to content

chore: add accessibility labels to widget views#7

Merged
minghinmatthewlam merged 2 commits intomainfrom
chore/accessibility-widgets
Mar 9, 2026
Merged

chore: add accessibility labels to widget views#7
minghinmatthewlam merged 2 commits intomainfrom
chore/accessibility-widgets

Conversation

@minghinmatthewlam
Copy link
Copy Markdown
Owner

Summary

  • Add .accessibilityHidden(true) to decorative flame icons and checkmark/circle icons across widget views
  • Add .accessibilityElement(children: .combine) and .accessibilityLabel() to streak badge HStacks and focus list row HStacks so VoiceOver reads them as single, meaningful elements (e.g., "3 day streak", "Exercise, completed")
  • Add .accessibilityLabel() and .accessibilityValue() to the lock screen Gauge and ProgressRing for clear VoiceOver readout

Files changed

  • Widgets/Views/HomeWidgetView.swift — streak badges (header + StreakBadgeView), focus list rows (FocusListView)
  • Widgets/Views/SmallHomeWidgetView.swift — streak badge, focus list rows
  • Widgets/Views/LockWidgetView.swift — Gauge label/value, fallback target image
  • Widgets/Views/ProgressRing.swift — progress label and percentage value

Test plan

  • TenXWidgets scheme builds without errors
  • TenX scheme builds without errors
  • All 9 unit tests pass

Add .accessibilityLabel(), .accessibilityHidden(), .accessibilityElement(),
and .accessibilityValue() to interactive and decorative elements across
all widget SwiftUI views:

- HomeWidgetView: streak badge (combine + label), flame icon (hidden),
  focus rows (combine + label), checkmark icons (hidden)
- SmallHomeWidgetView: same pattern for streak badge and focus rows
- LockWidgetView: gauge label/value, fallback target image label
- ProgressRing: progress label and percentage value
@minghinmatthewlam minghinmatthewlam merged commit 3e72de0 into main Mar 9, 2026
4 checks 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.

1 participant