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:
@@ -87,7 +87,7 @@ struct QuickAddItemSheet: View {
|
||||
}
|
||||
.sheet(isPresented: $showLocationSearch) {
|
||||
PlaceSearchSheet(category: selectedCategory) { place in
|
||||
withAnimation(Theme.Animation.spring) {
|
||||
Theme.Animation.withMotion(Theme.Animation.spring) {
|
||||
selectedPlace = place
|
||||
}
|
||||
// Use place name as title if empty
|
||||
@@ -209,6 +209,7 @@ struct QuickAddItemSheet: View {
|
||||
Image(systemName: "chevron.right")
|
||||
.font(.caption.weight(.semibold))
|
||||
.foregroundStyle(Theme.textMuted(colorScheme))
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
.padding(Theme.Spacing.md)
|
||||
.background(inputBackground)
|
||||
@@ -255,7 +256,7 @@ struct QuickAddItemSheet: View {
|
||||
|
||||
// Remove button
|
||||
Button {
|
||||
withAnimation(Theme.Animation.spring) {
|
||||
Theme.Animation.withMotion(Theme.Animation.spring) {
|
||||
selectedPlace = nil
|
||||
}
|
||||
} label: {
|
||||
@@ -263,7 +264,9 @@ struct QuickAddItemSheet: View {
|
||||
.font(.title3)
|
||||
.foregroundStyle(Theme.textMuted(colorScheme))
|
||||
}
|
||||
.accessibilityLabel("Remove location")
|
||||
.minimumHitTarget()
|
||||
.accessibilityLabel("Remove \(place.name ?? "location")")
|
||||
.accessibilityHint("Double-tap to remove this location from the item")
|
||||
}
|
||||
.padding(Theme.Spacing.md)
|
||||
.background(Theme.warmOrange.opacity(0.08))
|
||||
@@ -272,9 +275,6 @@ struct QuickAddItemSheet: View {
|
||||
RoundedRectangle(cornerRadius: Theme.CornerRadius.medium)
|
||||
.strokeBorder(Theme.warmOrange.opacity(0.3), lineWidth: 1)
|
||||
)
|
||||
.accessibilityElement(children: .combine)
|
||||
.accessibilityLabel("\(place.name ?? "Location"), \(formatAddress(for: place) ?? "")")
|
||||
.accessibilityHint("Double-tap the remove button to clear this location")
|
||||
}
|
||||
|
||||
// MARK: - Section Header
|
||||
@@ -284,6 +284,7 @@ struct QuickAddItemSheet: View {
|
||||
Image(systemName: icon)
|
||||
.font(.caption)
|
||||
.foregroundStyle(Theme.warmOrange)
|
||||
.accessibilityHidden(true)
|
||||
|
||||
Text(title)
|
||||
.font(.subheadline)
|
||||
@@ -440,7 +441,10 @@ private struct PressableStyle: ButtonStyle {
|
||||
func makeBody(configuration: Configuration) -> some View {
|
||||
configuration.label
|
||||
.scaleEffect(configuration.isPressed ? 0.97 : 1.0)
|
||||
.animation(.spring(response: 0.3, dampingFraction: 0.7), value: configuration.isPressed)
|
||||
.animation(
|
||||
Theme.Animation.prefersReducedMotion ? nil : .spring(response: 0.3, dampingFraction: 0.7),
|
||||
value: configuration.isPressed
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user