Key points
- Usually return to the control that opened the dialog; if it no longer exists, choose a logical next position.
- Distinguish a modal dialog from an ordinary notice before specifying its behaviour.
- Check opening, cancelling, completing and continuing, not just the appearance of the overlay.
Should focus return to the original button?
Usually, return focus to the control that opened the dialog so visitors can continue. If that control no longer exists, choose a logical alternative. The W3C APG dialog pattern also allows a different destination when it better supports the next workflow step after completion. Do not send focus arbitrarily to the page top.
This article concerns the dialog lifecycle and return destination, not focus-outline styling. Ask who opens the dialog and what the visitor should do after cancelling or completing it.
Is every floating notice a modal dialog?
No. An active modal dialog prevents normal interaction with the background, whereas an ordinary notice may not. Native HTML dialog provides related functionality, but modal and non-modal opening methods differ; see MDN’s dialog documentation.
Define whether the component provides supplementary information, edits a record or requires a decision before continuing. A dimmed background alone is not proof that focus behaviour has been handled.

How should the return journey be specified?
Record the opening control, reason for closing and next focus destination. Cancellation and completion may have different outcomes, but the difference should be intentional rather than accidental.
- Closing supplementary service information: usually return to its information button.
- Cancelling an edit: return to the original item’s edit control.
- Finishing an addition: consider moving to the newly added item to continue.
These are illustrative workflows, not measured client results. Confirm them against the actual business task rather than applying them blindly.
What else should the developer check?
Check that opening moves focus inside, the close control is reachable and closing leads to the agreed destination. The APG pattern describes Tab cycling inside a modal and Escape to close. Long content or irreversible actions require thought about initial focus rather than automatically selecting the first button.
Using a native component does not remove the need to check content, labelling and the journey. Ask for the implementation approach and coverage, rather than only whether ARIA was added.
What evidence should acceptance include?
Check different opening controls, cancellation, completion, reopening and removal of the original trigger. After each close, press Tab again to see whether continuation is logical. Record the browser, device and reproducible steps.
If only one entry point was tested, mark the others unchecked. This is a handover checklist, not a claim of testing on your website or a substitute for a complete accessibility assessment. Repeat each failed journey after repair before closing the ticket.
Frequently asked questions
Must focus return to a button that has been removed?
No. Choose an existing element that logically supports the next task and record the reason. See W3C APG.
Should every supported closing route be checked?
Yes: check supported routes such as close, cancel and completion, rather than only clicking the cross.
Does a dimmed background prove modal behaviour is correct?
No. Appearance does not prove correct background interaction or focus management.
May closing move directly to the next task?
There can be a justified exception. Confirm the completed action is directly related to that next step and test continuation. See W3C APG.
Has this article tested dialogs on my website?
No. It provides handover and acceptance guidance; actual results require checks on your site version.
