Never trap keyboard focus
Hard
Rule. Never trap keyboard focus, and let Esc leave every layer.
Why. Keyboard, switch, and voice users send keys, so a trap or a mouse-only function locks them out.
- Never make a control that only a pointer can reach.
- Every action works by keyboard: Rule 12.15. Focus order: Rule 12.16.
Figure. Tab reaches the button. Esc leaves a layer. Nothing traps focus.