implementation
Implement in your agent
# Implement Dropdown menu in your agent ## Objective Implement Dropdown menu for this verified behavior: A compact list of actions that opens from a button and supports menu-style keyboard navigation. ## Prerequisites - Inspect the repository, design system, and existing tests first. - Preserve unrelated changes and keep the file scope bounded. - Confirm that Dropdown menu matches the need before writing code. ## Required behavior - Activating the trigger opens the surface, and activating it again can close it. - Arrow keys move through available actions while Enter or Space activates one. - Escape closes the temporary surface and returns focus to a sensible control. ## States to cover - Menu closed — Menu closed - Menu open — Menu open ## Accessibility - The primary control or named region for Dropdown menu has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names. - Opening places menu focus on an enabled item; closing restores focus to the trigger. - Selecting an action, pressing Escape, or safely pressing outside closes the menu. - Enter, Space, or Arrow Down opens the menu - Arrow keys move between items - Enter activates the active item - Escape closes the menu ## Non-goals - The user is selecting a value for a form field - The content contains explanatory paragraphs or a form ## Acceptance criteria - Every item is an action rather than a form value - Arrow-key navigation follows the menu pattern - Disabled items are exposed and skipped - Closing restores focus to the trigger
sha256:c3fc83fdaabd6dfe71305d5fc97603fc0ce439c00115d8465464542f24292dc9