The plain-English version
Deciding where keyboard focus moves as an interface opens, closes, or changes.
Why it matters
It lets keyboard and assistive-technology users follow the same task as pointer users.
Let’s make it click
Opening a dialog moves focus into it; closing it returns focus to the control that opened it.
Vibe Bro’s heads-up
A visually hidden overlay can still leave interactive elements reachable unless its behavior is handled correctly.
The docs behind it
Documentation links checked .
Editorial review · October 28, 2026
Supported: Dialog entry, contained navigation, and return of focus match MDN's dialog guidance; the modal example is instructional.