Apply focus-management decisions for an accessible modal dialog.
Focus risk You own a delete-account modal with two buttons: Cancel and Delete account. The overlay appears visually, but the DOM behind it remains full of links and controls. The principle is predictable keyboard focus: users should not have to guess where their active point moved. APG focus path Enter -> Contain -> Return A modal changes the user's interaction mode. Your code must move focus into that mode, keep it there, and put it somewhere logical when the mode ends. Visual only Centering the card but leaving focus behind creates two competing realities. The keyboard path now matches the…
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in