feat: add WCAG AA accessibility app-wide, fix CloudKit container config, remove debug logs

- Add VoiceOver labels, hints, and element grouping across all 60+ views
- Add Reduce Motion support (Theme.Animation.prefersReducedMotion) to all animations
- Replace fixed font sizes with semantic Dynamic Type styles
- Hide decorative elements from VoiceOver with .accessibilityHidden(true)
- Add .minimumHitTarget() modifier ensuring 44pt touch targets
- Add AccessibilityAnnouncer utility for VoiceOver announcements
- Improve color contrast values in Theme.swift for WCAG AA compliance
- Extract CloudKitContainerConfig for explicit container identity
- Remove PostHog debug console log from AnalyticsManager

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-11 09:27:23 -06:00
parent e9c15d70b1
commit d63d311cab
77 changed files with 982 additions and 263 deletions

View File

@@ -63,6 +63,7 @@ struct ProgressTabView: View {
.font(.title2)
.foregroundStyle(Theme.warmOrange)
}
.accessibilityLabel("Add stadium visit")
}
}
.task {
@@ -153,7 +154,7 @@ struct ProgressTabView: View {
isSelected: viewModel.selectedSport == sport,
progress: progressForSport(sport)
) {
withAnimation(Theme.Animation.spring) {
Theme.Animation.withMotion(Theme.Animation.spring) {
viewModel.selectSport(sport)
}
}
@@ -180,13 +181,18 @@ struct ProgressTabView: View {
Circle()
.stroke(Theme.warmOrange.opacity(0.2), lineWidth: 8)
.frame(width: 80, height: 80)
.accessibilityHidden(true)
Circle()
.trim(from: 0, to: progress.progressFraction)
.stroke(Theme.warmOrange, style: StrokeStyle(lineWidth: 8, lineCap: .round))
.frame(width: 80, height: 80)
.rotationEffect(.degrees(-90))
.animation(.easeInOut(duration: 0.5), value: progress.progressFraction)
.animation(
Theme.Animation.prefersReducedMotion ? nil : .easeInOut(duration: 0.5),
value: progress.progressFraction
)
.accessibilityHidden(true)
VStack(spacing: 0) {
Text("\(progress.visitedStadiums)")
@@ -265,6 +271,7 @@ struct ProgressTabView: View {
HStack {
Image(systemName: "checkmark.circle.fill")
.foregroundStyle(.green)
.accessibilityHidden(true)
Text("Visited (\(viewModel.visitedStadiums.count))")
.font(.body)
.foregroundStyle(Theme.textPrimary(colorScheme))
@@ -292,6 +299,7 @@ struct ProgressTabView: View {
HStack {
Image(systemName: "circle.dotted")
.foregroundStyle(Theme.textMuted(colorScheme))
.accessibilityHidden(true)
Text("Not Yet Visited (\(viewModel.unvisitedStadiums.count))")
.font(.body)
.foregroundStyle(Theme.textPrimary(colorScheme))
@@ -331,6 +339,7 @@ struct ProgressTabView: View {
HStack(spacing: 4) {
Text("View All")
Image(systemName: "chevron.right")
.accessibilityHidden(true)
}
.font(.subheadline)
.foregroundStyle(Theme.warmOrange)
@@ -348,8 +357,9 @@ struct ProgressTabView: View {
.frame(width: 50, height: 50)
Image(systemName: "trophy.fill")
.font(.system(size: 24))
.font(.title3)
.foregroundStyle(Theme.warmOrange)
.accessibilityHidden(true)
}
VStack(alignment: .leading, spacing: 4) {
@@ -366,6 +376,7 @@ struct ProgressTabView: View {
Image(systemName: "chevron.right")
.foregroundStyle(Theme.textMuted(colorScheme))
.accessibilityHidden(true)
}
.padding(Theme.Spacing.md)
.background(Theme.cardBackground(colorScheme))
@@ -396,6 +407,7 @@ struct ProgressTabView: View {
HStack(spacing: 4) {
Text("See All")
Image(systemName: "chevron.right")
.accessibilityHidden(true)
}
.font(.subheadline)
.foregroundStyle(Theme.warmOrange)
@@ -432,6 +444,7 @@ struct ProgressStatPill: View {
HStack(spacing: 4) {
Image(systemName: icon)
.font(.caption)
.accessibilityHidden(true)
Text(value)
.font(.body)
}
@@ -460,6 +473,7 @@ struct StadiumChip: View {
Image(systemName: "checkmark.circle.fill")
.font(.caption)
.foregroundStyle(.green)
.accessibilityHidden(true)
}
VStack(alignment: .leading, spacing: 2) {
@@ -495,6 +509,7 @@ struct StadiumChip: View {
}
}
.buttonStyle(.plain)
.accessibilityElement(children: .combine)
}
}
@@ -513,6 +528,7 @@ struct RecentVisitRow: View {
Image(systemName: visit.sport.iconName)
.foregroundStyle(visit.sport.themeColor)
.accessibilityHidden(true)
}
VStack(alignment: .leading, spacing: 4) {
@@ -538,6 +554,7 @@ struct RecentVisitRow: View {
Image(systemName: "chevron.right")
.font(.caption)
.foregroundStyle(Theme.textMuted(colorScheme))
.accessibilityHidden(true)
}
.padding(Theme.Spacing.md)
.background(Theme.cardBackground(colorScheme))
@@ -546,6 +563,7 @@ struct RecentVisitRow: View {
RoundedRectangle(cornerRadius: Theme.CornerRadius.medium)
.stroke(Theme.surfaceGlow(colorScheme), lineWidth: 1)
}
.accessibilityElement(children: .combine)
}
}