src/components/common/FocusTrap.tsx queries focusable descendants and calls .focus() on the first one when active becomes true, but it has no keydown handler to cycle Tab/Shift+Tab within the container or prevent focus from escaping to the rest of the page.
Since this component is presumably used for modals (Modal.tsx, ConfirmModal.tsx), keyboard users can currently Tab out of an open modal into background content. Implement full cyclic focus trapping (or adopt a small tested library) and add a test.
src/components/common/FocusTrap.tsxqueries focusable descendants and calls.focus()on the first one whenactivebecomes true, but it has nokeydownhandler to cycle Tab/Shift+Tab within the container or prevent focus from escaping to the rest of the page.Since this component is presumably used for modals (
Modal.tsx,ConfirmModal.tsx), keyboard users can currently Tab out of an open modal into background content. Implement full cyclic focus trapping (or adopt a small tested library) and add a test.