The traditional accessibility advice to trap focus within modal dialogs is now outdated when using the native HTML `<dialog>` element with the `showModal` method. According to discussions from accessibility experts like Scott O'Hara and Léonie Watson, and conclusions from the W3C's Accessible Platform Architectures Working Group, allowing users to tab out of a dialog to browser chrome (like the address bar) provides valuable flexibility. This enables keyboard users to open new tabs, change settings, or escape kiosk situations naturally. The old focus-trapping guidance was written before the `<dialog>` element and `inert` attribute were widely supported, and applied primarily to custom scripted modals.

Table of contents
Some notes for you1 Comment
Sort: