The scenario
The dialog opens correctly but keyboard users lose their place when it closes. The trigger remains in the page.
Required context: a selected repository matching this scenario, relevant task evidence, and access to its instructions and checks. Use redacted or synthetic data where appropriate.
Adapt the complete prompt
Edits stay in this browser tab. Saving bookmarks the original example; export your edited version to keep it elsewhere.
Why this is a strong example
The prompt specifies the observable focus behavior and asks for an interactive check rather than a screenshot.
A concrete outcome
Restore keyboard focus to the dialog trigger after the dialog closes.
The result can be assessed against an observable task rather than prompt length or confidence.
Boundaries and a method
Inspect the existing dialog primitive and focus lifecycle. Reuse the established accessible component and avoid a page-wide keyboard handler.
This leaves implementation judgment while constraining the changes that would exceed the task.
Evidence that can disagree
Open by keyboard, close with the supported close actions, and verify focus returns to the trigger. Check tab behavior while the dialog is open.
These checks describe what would make acceptance justified; asking for them does not mean they ran.
A safe way to encounter uncertainty
If the repository contradicts these assumptions, required access is unavailable, or a consequential product decision is missing, explain the conflict and pause the dependent work. Preserve unrelated changes.
Consequential uncertainty stays visible rather than being converted into an invented requirement.