Implement correctly
Build State transition without breaking its behavior
# Implement State transition in your agent ## Objective Implement State transition for this verified behavior: A state transition changes meaningful interface state, such as Draft to Saved. Animation can reinforce that feedback; it must never determine whether saving succeeded. ## Prerequisites - Inspect the repository, design system, and existing tests first. - Preserve unrelated changes and keep the file scope bounded. - Confirm that State transition matches the need before writing code. ## Required behavior - A live region announces new status only when the update is important and not already focused. - Pointer, Enter, or Space activation runs one named action exactly once. ## States to cover - Ready — Static initial state - Running — The optional effect runs - Paused — Playback is frozen - Result — Persistent result with no motion required ## Accessibility - ARIA role: button + select + checkbox + status - The primary control or named region for State transition has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names. - Focus stays on the activated control. Reset restores focus to its button. - Pause freezes playback; static fallback cancels it. Leaving the specimen cancels its animation and removes listeners. - Announce state changes with concise text, never animation frames. Decorative graphics stay hidden from assistive technology. - Tab reaches every control - Enter or Space activates buttons; arrows change the native select; Space toggles the static fallback checkbox ## When not to use - Never wait for animation completion to commit data or report success before the operation resolves. ## Acceptance criteria - The result is readable with no animation - Pause, system reduction and fallback work during playback - Unmount cancels effects and listeners - Only transform or opacity changes; device cost remains unmeasured ## Guardrails - Show the proposed changes before any external action. - Do not publish, send, delete, pay for, or change remote state without explicit authorization. - Preserve unrelated changes and stop if the scope becomes ambiguous. ## Output format - Outcome or verdict. - Files or actions involved. - Checks run and observable evidence. - Remaining blockers or limitations.
- Web platform
- Requires · Access to the repository, design system, and tests
Why it works
- The need is tied to canonical behavior before any technical choice.
- States, accessibility, and non-goals prevent a merely visual implementation.
- Acceptance criteria and the output format make verification observable.
Try next
Verify State transition on a real journey
# Verify State transition after implementation ## Objective Audit the State transition implementation against its behavior, states, and accessibility requirements without changing it automatically. ## Checks - Replay the smallest representative journey. - Check keyboard behavior, focus, accessible name, and announcements. - Tie each gap to a specific acceptance criterion. ## Guardrails - Show the proposed changes before any external action. - Do not publish, send, delete, pay for, or change remote state without explicit authorization. - Preserve unrelated changes and stop if the scope becomes ambiguous. ## Output format - Outcome or verdict. - Files or actions involved. - Checks run and observable evidence. - Remaining blockers or limitations.
sha256:4d8bd7667ca40c4e458d053b22411f52fdedba0e1621a697b85c96393b39a95b