ConfirmModal focused the first input on mount and listened for Escape, but didn't trap Tab. Keyboard users could Tab out of the modal into the underlying page — a strong accessibility violation and a confusing keyboard-UX moment. Add a handleTrapTab keydown handler on the dialog div that: - Enumerates focusables (button:not([disabled]), input:not([disabled]), select, textarea, a[href], [tabindex]:not(-1)). - On Tab from the last focusable, wraps to the first. - On Shift+Tab from the first, wraps to the last. The dialog ref is bound via bind:this; the handler is no-op if the dialog isn't mounted yet. AUDIT.md anchor: F-U-016. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7.4 KiB
7.4 KiB