diff --git a/skills/frontend-a11y/SKILL.md b/skills/frontend-a11y/SKILL.md index 46adc8cc..3d6ce5e2 100644 --- a/skills/frontend-a11y/SKILL.md +++ b/skills/frontend-a11y/SKILL.md @@ -257,6 +257,8 @@ export function Dropdown({ options, onSelect }: { options: string[]; onSelect: ( const [activeIndex, setActiveIndex] = useState(0); const listId = useId(); + if (!options.length) return null; + const handleKeyDown = (e: React.KeyboardEvent) => { switch (e.key) { case 'ArrowDown':