IT lexicon › Web › inert

inert

Web På svenska → Updated: 2026-07-29

HTML attribute that makes an entire subtree inoperative: not clickable, not focusable, invisible to screen readers and skipped by find-in-page.

The need arises every time something is placed over the rest of the page — a modal, a slide-out menu, an overlay. Without the attribute you have to disable the content behind by hand, which in practice means setting tabindex="-1" on every focusable element, remembering their original values, and putting aria-hidden on the container. Almost no implementation got all of that right, with the result that keyboard focus wandered down behind the dialog and the user got lost. The attribute does the whole job in one word. Using <dialog> with showModal() applies it automatically to everything outside the dialog. Supported in all major browsers since 2023.

← Back to the lexicon