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

@@ -33,28 +33,46 @@ struct TeamFirstWizardStep: View {
subtitle: "Select 2 or more teams to find optimal trip windows"
)
// Selection button
Button {
showTeamPicker = true
} label: {
HStack {
if !selectedTeams.isEmpty {
// Show selected teams
teamPreview
Spacer()
Button {
selectedTeamIds.removeAll()
selectedSport = nil
} label: {
Image(systemName: "xmark.circle.fill")
.foregroundStyle(Theme.textMuted(colorScheme))
if !selectedTeams.isEmpty {
HStack(spacing: Theme.Spacing.sm) {
Button {
showTeamPicker = true
} label: {
HStack {
teamPreview
Spacer()
}
} else {
// Empty state
.contentShape(Rectangle())
}
.buttonStyle(.plain)
Button {
selectedTeamIds.removeAll()
selectedSport = nil
} label: {
Image(systemName: "xmark.circle.fill")
.foregroundStyle(Theme.textMuted(colorScheme))
}
.buttonStyle(.plain)
.minimumHitTarget()
.accessibilityLabel("Clear all teams")
}
.padding(Theme.Spacing.md)
.background(Theme.cardBackgroundElevated(colorScheme))
.clipShape(RoundedRectangle(cornerRadius: Theme.CornerRadius.medium))
.overlay(
RoundedRectangle(cornerRadius: Theme.CornerRadius.medium)
.stroke(Theme.warmOrange, lineWidth: 2)
)
} else {
// Selection button
Button {
showTeamPicker = true
} label: {
HStack {
Image(systemName: "person.2.fill")
.foregroundStyle(Theme.warmOrange)
.accessibilityHidden(true)
Text("Select teams")
.font(.subheadline)
@@ -65,17 +83,18 @@ struct TeamFirstWizardStep: View {
Image(systemName: "chevron.right")
.font(.caption)
.foregroundStyle(Theme.textMuted(colorScheme))
.accessibilityHidden(true)
}
.padding(Theme.Spacing.md)
.background(Theme.cardBackgroundElevated(colorScheme))
.clipShape(RoundedRectangle(cornerRadius: Theme.CornerRadius.medium))
.overlay(
RoundedRectangle(cornerRadius: Theme.CornerRadius.medium)
.stroke(Theme.textMuted(colorScheme).opacity(0.3), lineWidth: 1)
)
}
.padding(Theme.Spacing.md)
.background(Theme.cardBackgroundElevated(colorScheme))
.clipShape(RoundedRectangle(cornerRadius: Theme.CornerRadius.medium))
.overlay(
RoundedRectangle(cornerRadius: Theme.CornerRadius.medium)
.stroke(isValid ? Theme.warmOrange : Theme.textMuted(colorScheme).opacity(0.3), lineWidth: isValid ? 2 : 1)
)
.buttonStyle(.plain)
}
.buttonStyle(.plain)
// Validation message
if selectedTeamIds.isEmpty {
@@ -139,6 +158,7 @@ struct TeamFirstWizardStep: View {
.zIndex(Double(4 - index))
}
}
.accessibilityHidden(true)
Text("\(selectedTeamIds.count) teams")
.font(.subheadline)
@@ -279,14 +299,17 @@ private struct TeamMultiSelectListView: View {
if selectedTeamIds.contains(team.id) {
Image(systemName: "checkmark.circle.fill")
.foregroundStyle(Theme.warmOrange)
.accessibilityHidden(true)
} else {
Image(systemName: "circle")
.foregroundStyle(Theme.textMuted(colorScheme).opacity(0.5))
.accessibilityHidden(true)
}
}
.padding(.vertical, Theme.Spacing.xs)
}
.buttonStyle(.plain)
.accessibilityAddTraits(selectedTeamIds.contains(team.id) ? .isSelected : [])
}
}
.listStyle(.plain)
@@ -316,7 +339,7 @@ private struct TeamMultiSelectListView: View {
}
private func toggleTeam(_ team: Team) {
withAnimation(.easeInOut(duration: 0.15)) {
Theme.Animation.withMotion(.easeInOut(duration: 0.15)) {
if selectedTeamIds.contains(team.id) {
selectedTeamIds.remove(team.id)
} else {