Accessibility overhaul

This commit is contained in:
Jack Kingsman
2026-03-02 20:34:06 -08:00
parent 7d39e726b4
commit fb279ccf1a
35 changed files with 348 additions and 107 deletions
+9
View File
@@ -0,0 +1,9 @@
import type { KeyboardEvent } from 'react';
/** Activate a clickable non-button element on Enter or Space, mirroring native button behavior. */
export function handleKeyboardActivate(e: KeyboardEvent) {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
(e.currentTarget as HTMLElement).click();
}
}