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

@@ -46,12 +46,6 @@ struct OnboardingSubscription: View {
.multilineTextAlignment(.center)
.padding(.bottom, 8)
// Trial info
Text("Start your free 7-day trial")
.font(.system(size: 16, weight: .semibold))
.foregroundColor(.white.opacity(0.9))
.padding(.bottom, 24)
Spacer()
// Benefits list
@@ -67,7 +61,7 @@ struct OnboardingSubscription: View {
BenefitRow(
icon: "lightbulb.fill",
title: "Smart Insights",
title: "AI-Powered Insights",
description: "Discover trends and patterns in your moods"
)
@@ -75,27 +69,18 @@ struct OnboardingSubscription: View {
.background(.white.opacity(0.2))
BenefitRow(
icon: "clock.arrow.circlepath",
title: "Unlimited History",
description: "Access all your past mood data forever"
icon: "heart.text.square.fill",
title: "Health Data Correlation",
description: "Connect your mood with sleep, steps, and more"
)
Divider()
.background(.white.opacity(0.2))
BenefitRow(
icon: "icloud.fill",
title: "Cloud Sync",
description: "Your data synced across all your devices"
)
Divider()
.background(.white.opacity(0.2))
BenefitRow(
icon: "heart.fill",
title: "Support Development",
description: "Help us keep improving Feels for everyone"
icon: "square.grid.2x2.fill",
title: "Interactive Widgets",
description: "Log your mood directly from your home screen"
)
}
.padding(.vertical, 8)
@@ -118,7 +103,7 @@ struct OnboardingSubscription: View {
Image(systemName: "sparkles")
.font(.system(size: 18, weight: .semibold))
Text("Start Free Trial")
Text("Get Personal Insights")
.font(.system(size: 18, weight: .bold))
}
.foregroundColor(Color(hex: "11998e"))
@@ -130,6 +115,8 @@ struct OnboardingSubscription: View {
.shadow(color: .black.opacity(0.15), radius: 10, y: 5)
)
}
.accessibilityLabel(String(localized: "Get Personal Insights"))
.accessibilityHint(String(localized: "Opens subscription options"))
// Skip button
Button(action: {
@@ -141,6 +128,8 @@ struct OnboardingSubscription: View {
.font(.system(size: 16, weight: .medium))
.foregroundColor(.white.opacity(0.8))
}
.accessibilityLabel(String(localized: "Maybe Later"))
.accessibilityHint(String(localized: "Skip subscription and complete setup"))
.padding(.top, 4)
}
.padding(.horizontal, 24)
@@ -168,6 +157,7 @@ struct BenefitRow: View {
.font(.system(size: 22))
.foregroundColor(.white)
.frame(width: 40)
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 2) {
Text(title)
@@ -183,6 +173,8 @@ struct BenefitRow: View {
}
.padding(.horizontal, 20)
.padding(.vertical, 14)
.accessibilityElement(children: .combine)
.accessibilityLabel("\(title): \(description)")
}
}