Add comprehensive WCAG 2.1 AA accessibility support

- Add VoiceOver labels and hints to all voting layouts, settings, widgets,
  onboarding screens, and entry cells
- Add Reduce Motion support to button animations throughout the app
- Ensure 44x44pt minimum touch targets on widget mood buttons
- Enhance AccessibilityHelpers with Dynamic Type support, ScaledValue wrapper,
  and VoiceOver detection utilities
- Gate premium features (Insights, Month/Year views) behind subscription
- Update widgets to show subscription prompts for non-subscribers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-23 23:26:21 -06:00
parent a6a6912183
commit 086f8b8807
24 changed files with 741 additions and 283 deletions

View File

@@ -174,6 +174,7 @@ extension DayView {
Image(systemName: "calendar")
.font(.system(size: 16, weight: .semibold))
.foregroundColor(textColor.opacity(0.6))
.accessibilityHidden(true)
Text("\(Random.monthName(fromMonthInt: month)) \(String(year))")
.font(.system(size: 20, weight: .bold, design: .rounded))
@@ -184,6 +185,9 @@ extension DayView {
.padding(.horizontal, 16)
.padding(.vertical, 14)
.background(.ultraThinMaterial)
.accessibilityElement(children: .combine)
.accessibilityLabel(String(localized: "\(Random.monthName(fromMonthInt: month)) \(String(year))"))
.accessibilityAddTraits(.isHeader)
}
private func auraSectionHeader(month: Int, year: Int) -> some View {

View File

@@ -67,11 +67,12 @@ class DayViewViewModel: ObservableObject {
return
}
// Sync to HealthKit for past day updates
// Sync to HealthKit for past day updates (only if user has full access)
guard mood != .missing && mood != .placeholder else { return }
let healthKitEnabled = GroupUserDefaults.groupDefaults.bool(forKey: UserDefaultsStore.Keys.healthKitEnabled.rawValue)
if healthKitEnabled {
let hasAccess = !IAPManager.shared.shouldShowPaywall
if healthKitEnabled && hasAccess {
Task {
try? await HealthKitManager.shared.saveMood(mood, for: entry.forDate)
}