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

@@ -26,45 +26,63 @@ struct EntryListView: View {
}
var body: some View {
switch dayViewStyle {
case .classic:
classicStyle
case .minimal:
minimalStyle
case .compact:
compactStyle
case .bubble:
bubbleStyle
case .grid:
gridStyle
case .aura:
auraStyle
case .chronicle:
chronicleStyle
case .neon:
neonStyle
case .ink:
inkStyle
case .prism:
prismStyle
case .tape:
tapeStyle
case .morph:
morphStyle
case .stack:
stackStyle
case .wave:
waveStyle
case .pattern:
patternStyle
case .leather:
leatherStyle
case .glass:
glassStyle
case .motion:
motionStyle
case .micro:
microStyle
Group {
switch dayViewStyle {
case .classic:
classicStyle
case .minimal:
minimalStyle
case .compact:
compactStyle
case .bubble:
bubbleStyle
case .grid:
gridStyle
case .aura:
auraStyle
case .chronicle:
chronicleStyle
case .neon:
neonStyle
case .ink:
inkStyle
case .prism:
prismStyle
case .tape:
tapeStyle
case .morph:
morphStyle
case .stack:
stackStyle
case .wave:
waveStyle
case .pattern:
patternStyle
case .leather:
leatherStyle
case .glass:
glassStyle
case .motion:
motionStyle
case .micro:
microStyle
}
}
.accessibilityElement(children: .combine)
.accessibilityLabel(accessibilityDescription)
.accessibilityHint(isMissing ? String(localized: "Tap to log mood for this day") : String(localized: "Tap to view or edit"))
.accessibilityAddTraits(.isButton)
}
private var accessibilityDescription: String {
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .full
let dateString = dateFormatter.string(from: entry.forDate)
if isMissing {
return String(localized: "\(dateString), no mood logged")
} else {
return "\(dateString), \(entry.mood.strValue)"
}
}