Files
Sportstime/SportsTime/Features/Trip/Views/ItineraryRows/GameItemRow.swift
Trey t d63d311cab 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>
2026-02-11 09:27:23 -06:00

72 lines
2.4 KiB
Swift

//
// GameItemRow.swift
// SportsTime
//
// Row view for displaying a game in the itinerary. Prominent card styling with sport color accent.
// Games are not reorderable so no drag handle is shown.
//
import SwiftUI
struct GameItemRow: View {
let game: RichGame
@Environment(\.colorScheme) private var colorScheme
var body: some View {
HStack(spacing: Theme.Spacing.md) {
// Sport color bar
SportColorBar(sport: game.game.sport)
VStack(alignment: .leading, spacing: 4) {
// Sport badge + Matchup
HStack(spacing: 6) {
HStack(spacing: 3) {
Image(systemName: game.game.sport.iconName)
.font(.caption2)
.accessibilityHidden(true)
Text(game.game.sport.rawValue)
.font(.caption2)
}
.foregroundStyle(game.game.sport.themeColor)
HStack(spacing: 4) {
Text(game.awayTeam.abbreviation)
.font(.body)
Text("@")
.foregroundStyle(Theme.textMuted(colorScheme))
Text(game.homeTeam.abbreviation)
.font(.body)
}
.foregroundStyle(Theme.textPrimary(colorScheme))
}
// Stadium
HStack(spacing: 4) {
Image(systemName: "building.2")
.font(.caption2)
.accessibilityHidden(true)
Text(game.stadium.name)
.font(.subheadline)
}
.foregroundStyle(Theme.textSecondary(colorScheme))
}
Spacer()
// Time
Text(game.localGameTimeShort)
.font(.subheadline)
.foregroundStyle(Theme.warmOrange)
}
.accessibilityElement(children: .combine)
.padding(Theme.Spacing.md)
.background(Theme.cardBackgroundElevated(colorScheme))
.clipShape(RoundedRectangle(cornerRadius: Theme.CornerRadius.medium))
.overlay {
RoundedRectangle(cornerRadius: Theme.CornerRadius.medium)
.strokeBorder(game.game.sport.themeColor.opacity(0.3), lineWidth: 1)
}
}
}