Accessibility·Intermediate·Output based·1 min read
How should a modal dialog manage focus?
Short interview answer
Move focus to an appropriate element inside, contain Tab navigation while modal, support Escape where the interaction permits, hide or inert background interaction, and restore focus to the trigger or another logical destination on close.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.