From 318720e3967596fe3c53f52fe96eaaa64b4f4840 Mon Sep 17 00:00:00 2001 From: GiftedGiftB Date: Fri, 24 Jul 2026 01:38:03 +0100 Subject: [PATCH 1/2] fix: countdown reduced-motion --- components/disputes/shared/CountdownTimer.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/disputes/shared/CountdownTimer.tsx b/components/disputes/shared/CountdownTimer.tsx index 0b47aac6..e3a206ab 100644 --- a/components/disputes/shared/CountdownTimer.tsx +++ b/components/disputes/shared/CountdownTimer.tsx @@ -210,9 +210,12 @@ export function CountdownTimer({ deadline, label }: CountdownTimerProps) { > {visibleLabel} - - {announcement} - + {/* Avoid duplicate text and unnecessary live region updates when reduced motion is preferred */} + {!prefersReducedMotion && ( + + {announcement} + + )} ); } From e88631cbd4748eb5061973b43143bb739a914c4c Mon Sep 17 00:00:00 2001 From: GiftedGiftB Date: Fri, 24 Jul 2026 01:40:05 +0100 Subject: [PATCH 2/2] style: add minor whitespace for code readability in CountdownTimer and tests --- components/disputes/shared/CountdownTimer.tsx | 2 ++ components/disputes/shared/__tests__/CountdownTimer.test.tsx | 1 + 2 files changed, 3 insertions(+) diff --git a/components/disputes/shared/CountdownTimer.tsx b/components/disputes/shared/CountdownTimer.tsx index e3a206ab..26298b14 100644 --- a/components/disputes/shared/CountdownTimer.tsx +++ b/components/disputes/shared/CountdownTimer.tsx @@ -6,6 +6,7 @@ import { cn } from '@/lib/utils'; interface CountdownTimerProps { deadline: Date; label?: string; + } interface TimeLeft { @@ -13,6 +14,7 @@ interface TimeLeft { hours: number; minutes: number; seconds: number; + } function computeTimeLeft(deadline: Date): TimeLeft | null { diff --git a/components/disputes/shared/__tests__/CountdownTimer.test.tsx b/components/disputes/shared/__tests__/CountdownTimer.test.tsx index be349ca8..5a75fd8a 100644 --- a/components/disputes/shared/__tests__/CountdownTimer.test.tsx +++ b/components/disputes/shared/__tests__/CountdownTimer.test.tsx @@ -200,6 +200,7 @@ describe('CountdownTimer', () => { const liveRegion = container.querySelector('[aria-live="polite"]'); expect(liveRegion?.textContent).toBe('Deadline passed'); }); + }); describe('reduced motion', () => {