implementation
Implement in your agent
# Implement Combobox in your agent ## Objective Implement Combobox for this verified behavior: A value control with an associated popup; it can be editable or select-only, and the popup can be a listbox, grid, tree, or dialog. ## Prerequisites - Inspect the repository, design system, and existing tests first. - Preserve unrelated changes and keep the file scope bounded. - Confirm that Combobox matches the need before writing code. ## Required behavior - The value control owns or controls an associated popup, exposes its expanded state and follows the keyboard model of the popup role. - Escape closes the temporary surface and returns focus to a sensible control. ## States to cover - Combobox idle — Combobox idle - Suggestions open — Suggestions open - City committed — City committed ## Accessibility - The primary control or named region for Combobox has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names. - In this editable listbox-popup specimen, DOM focus remains in the input while the active-option relationship communicates list navigation; other popup roles follow their own focus model. - Escape closes an open popup without committing a new value; whether text is preserved and which other actions close it are defined by the combobox subtype. - In this editable listbox-popup specimen, typing edits the query - Arrow Down and Up move the active option while focus remains in the input - Enter commits the active option - Escape closes suggestions without clearing text ## Non-goals - A short native Select is simpler - No associated popup or disclosed assistance is needed ## Acceptance criteria - Editable or select-only behavior is explicit - The popup role and ownership relationship are explicit - Focus and keyboard behavior match the popup role - Escape closes the popup without committing a new value
sha256:a7a65d49f73ca9d07198bf4b3e7bcbac229a11888b60915abae76154a24ab91a