From e971e16cc6afa884b49d11861da2c76c16b6e576 Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Fri, 5 Jun 2026 20:41:28 -0400 Subject: [PATCH] =?UTF-8?q?feat(03-12):=20GREEN=20=E2=80=94=20WR-07=20real?= =?UTF-8?q?=20focus=20trap=20on=20EventForm=20dialog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Tab/Shift+Tab focus trap to the dialog element: - onKeyDown handler queries all focusable elements inside dialogRef - Tab from last element wraps to first (preventDefault) - Shift+Tab from first element wraps to last (preventDefault) - No new dependency — implemented inline with dialogRef - Existing focus-on-open (titleRef) and Escape-to-close unchanged - Update docblock: focus trap claim is now accurate (WR-07) --- apps/pwa/src/components/EventForm.tsx | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/apps/pwa/src/components/EventForm.tsx b/apps/pwa/src/components/EventForm.tsx index 7bd0d3d..6b19d93 100644 --- a/apps/pwa/src/components/EventForm.tsx +++ b/apps/pwa/src/components/EventForm.tsx @@ -21,6 +21,7 @@ * Accessibility: * - role="dialog", aria-modal="true", aria-label="New Event"/"Edit Event" * - Focus moves to Title input on open + * - Focus trap: Tab/Shift+Tab cycle focus within dialog; never reaches background (WR-07) * - Escape / backdrop click closes form * - All-day toggle: role="switch", aria-checked * - Recurrence: