From c220e26bb496e455a5bdb6a8dc22abf09ecfed5f Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Tue, 21 Jul 2026 20:47:34 -0500 Subject: feat(a11y): color independence, reduce motion, reduce transparency (#21 phase 5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Audit unchanged at 11 dark / 14 light — expected, as none of these settings are exercised by performAccessibilityAudit, and simctl can toggle only Increase Contrast, not Differentiate Without Color, Reduce Motion, or Reduce Transparency. Correct by construction and build-clean; runtime behaviour is verified in the Phase 6 manual pass. Color independence: - Widget status is now an SF Symbol (checkmark.circle.fill / exclamationmark.triangle.fill / exclamationmark.octagon.fill), the same vocabulary as the in-app badges, replacing a silent colour-only dot on both the domain rows and the small-view count pills. Status now survives greyscale and reads consistently across surfaces. - Under accessibilityDifferentiateWithoutColor: the Dashboard summary-card dot becomes a per-filter symbol, the selected quick-filter chip gains a checkmark and a border (selection was fill-colour only, and also gains the .isSelected trait), and LabeledValueRow prefixes a warning/failure symbol. All gated on the setting so the default UI stays uncluttered. Reduce motion: all five withAnimation/.animation sites now pass nil under accessibilityReduceMotion — AppCopyButton's check cross-fade, CollapsibleSectionView's expand/collapse, TimelineDiffView's scroll, and WatchlistView's list reorder. Reduce transparency: the single .thinMaterial capsule falls back to an opaque AppSurfaceElevated fill under accessibilityReduceTransparency. The SweepActivityController item from the plan is dropped: it is pure ActivityKit lifecycle with no animation, confirmed back in the issue triage. --- DomainDig/DomainDigUI.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'DomainDig/DomainDigUI.swift') diff --git a/DomainDig/DomainDigUI.swift b/DomainDig/DomainDigUI.swift index de93a56..a50f766 100644 --- a/DomainDig/DomainDigUI.swift +++ b/DomainDig/DomainDigUI.swift @@ -260,6 +260,7 @@ struct AppStatusBadgeView: View { struct AppCopyButton: View { @Environment(\.appDensity) private var appDensity + @Environment(\.accessibilityReduceMotion) private var reduceMotion @State private var didCopy = false /// Grows with Dynamic Type. The `max(_, minimumTapTarget)` floor matters @@ -274,13 +275,13 @@ struct AppCopyButton: View { Button { AppClipboard.copy(value) AppHaptics.copy() - withAnimation(.easeInOut(duration: 0.18)) { + withAnimation(reduceMotion ? nil : .easeInOut(duration: 0.18)) { didCopy = true } Task { try? await Task.sleep(nanoseconds: 900_000_000) await MainActor.run { - withAnimation(.easeInOut(duration: 0.18)) { + withAnimation(reduceMotion ? nil : .easeInOut(duration: 0.18)) { didCopy = false } } @@ -411,6 +412,7 @@ struct EmptyStateCardView: View { struct CollapsibleSectionView: View { @Environment(\.appDensity) private var appDensity + @Environment(\.accessibilityReduceMotion) private var reduceMotion let title: String @Binding var isCollapsed: Bool @@ -435,7 +437,7 @@ struct CollapsibleSectionView: View { var body: some View { VStack(alignment: .leading, spacing: appDensity.metrics.cardSpacing) { Button { - withAnimation(.easeInOut(duration: 0.2)) { + withAnimation(reduceMotion ? nil : .easeInOut(duration: 0.2)) { isCollapsed.toggle() } } label: { -- cgit v1.2.3