implementation
Implement in your agent
# Implement Switch in your agent ## Objective Implement Switch for this verified behavior: A binary control that exposes a setting as on or off. ## Prerequisites - Inspect the repository, design system, and existing tests first. - Preserve unrelated changes and keep the file scope bounded. - Confirm that Switch matches the need before writing code. ## Required behavior - Activation changes the binary state; when that value is persisted is a separate product decision. - The control keeps the same accessible name while its checked, on, or off state changes. ## States to cover - Setting off — Setting off - Setting on — Setting on ## Accessibility - The primary control or named region for Switch has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names. - The switch is one visible focus stop and its label activates the same control. - Not applicable: the setting persists until toggled again; a failed update restores the prior state. - Tab focuses the switch - Space toggles on and off ## Non-goals - The value is an independent checked choice rather than an on or off setting - The choice is one of three or more mutually exclusive values ## Acceptance criteria - The control exposes an unambiguous on or off state - The label stays constant when the state changes - On and off differ by more than color - Failure restores state and is explained in context
sha256:2025cf3cfb04c9bb04c970575542822c139a57bc0ed6d61f14cc79c29a6c510f