interactions@Ibelick
Don't Rebuild Keyboard Behavior
NEVER
NEVER: Rebuild keyboard or focus behavior by hand unless explicitly requested. Use established primitives. Hand-rolled accessibility is usually incomplete.
Avoid manually implementing keyboard navigation and focus management that libraries handle correctly
Bad
Good
Why it matters
Manual keyboard handling is error-prone. Hand-rolled versions routinely miss RTL arrow direction, skipping disabled items, type-ahead search, focus restoration on close, and roving tabindex. The escape hatch in the rule is real, though: if someone explicitly asks for custom behavior a primitive cannot express, build it — deliberately, not by accident.