Implement correctly
Build Search field without breaking its behavior
# Implement Search field in your agent ## Objective Implement Search field for this verified behavior: A text input inside a named search form that submits a query to find matching content. ## Prerequisites - Inspect the repository, design system, and existing tests first. - Preserve unrelated changes and keep the file scope bounded. - Confirm that Search field matches the need before writing code. ## Required behavior - Enter submits the current query through a named search form without changing the field pattern. - The clear control empties the query, keeps focus in the field, and updates results predictably. - A specific inline message identifies the invalid field and explains how to correct it. ## States to cover - Search idle with an empty query - Search query ready to submit - Search loading - Search results visible - No search results - Search error - Search result opened ## Accessibility - ARIA role: search > input[type=search] - The primary control or named region for Search field has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names. - Submitting leaves focus in the search form while results update below; clearing returns focus to the query field. - Not applicable: results update inline; Clear removes the query, submitted results, opened-result status, and errors. - The search landmark name, field label, submitted query, result count, loading, no-result, and error states are exposed. - Tab focuses the query field - Enter submits the search - Tab reaches the explicit clear and submit controls ## When not to use - The text is a general form property - Selectable suggestions are required but Combobox behavior is not implemented ## Acceptance criteria - The field lives in a named search form - Enter and the visible submit action run the same query - Clear keeps focus and updates results predictably - Loading, no-result, error, and empty-query states are explicit ## 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 Search field on a real journey
# Verify Search field after implementation ## Objective Audit the Search field 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:e5e6c3d803711814c00fd471193ca98162cec37b3089b15a434b167a614551d3