When a modal dialog or drawer opens, it demands the user's immediate attention. If focus is not managed properly, two severe accessibility bugs occur:
Tab cycles behind the modal into the obscured background page, confusing screen reader and keyboard users.<body> tag rather than returning to the button that triggered the modal.A governed modal component must implement a Focus Trap:
Tab on the last interactive element wraps focus back to the first element in the modal.Escape closes the modal immediately and restores focus to the triggering element.Level 2 · Core Principles & Governance