accessibility / HTML dialog / focus

Review HTML dialog focus return

Review dialog open, close, Escape, focus return and inert background behavior with fixed cases. Existing application dialogs and external settings are not changed.

Dialog interaction contract

A dialog can look open while leaving keyboard users without a clear focus return. Separate the contract points before implementation.

CaseReviewDecision
open-focus-entryfocus after openmove to the first control
close-focus-returnfocus after closereturn to the trigger
escape-cancelEscape / cancelclose and restore return target
inert-backgroundbackground while modalremove it from interaction
missing-returnmissing return targetdecide before implementation

Review order

  1. Check where focus lands immediately after open.
  2. Separate close, Escape and cancel outcomes.
  3. Check whether focus returns to the trigger.
  4. Check that the background is removed from interaction.

This page uses fixed cases and one local dialog only. It accepts no user data and changes no application setting.

Save fixed materials

Fixed dialog

Focus moves here, then Escape or Close returns it to the trigger.