implementation
Implement in your agent
# Implement Button in your agent ## Objective Implement Button for this verified behavior: A named control that performs an action in the current interface when activated. ## Prerequisites - Inspect the repository, design system, and existing tests first. - Preserve unrelated changes and keep the file scope bounded. - Confirm that Button matches the need before writing code. ## Required behavior - Pointer, Enter, or Space activation runs one named action exactly once. - The content region exposes its busy state while a separate visual indicator remains redundant. ## States to cover - Save idle — Save idle - Save pending — Save pending - Save error — Save error - Save successful — Save successful ## Accessibility - The primary control or named region for Button has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names. - A high-contrast focus indicator remains visible in every enabled visual variant and pending state. - Not applicable: an action button does not open a surface unless that separate relationship is defined. - Tab focuses the button - Enter and Space activate it - Form submit behavior follows its explicit type ## Non-goals - Activation primarily navigates to another URL - The control has no clear action name ## Acceptance criteria - The button performs an action rather than navigation - Its visible label states that action - Enter, Space, focus, disabled, and pending states work - Text contrast and target size meet the quality bar
sha256:0791a87ad2ea37ce95a43734f540878bfcfe5f8d49341dab8107b6b7d2518f9f