inert Attribute Playground

Put the neighbourhood head’s TUTUP board on parts of the page with inert: the browser answers whether Bayu’s Tab still lands, Wulan’s click still hits, and…

Why it matters

Focus straying behind a dialog, into a closed drawer or into a form that is loading leaves keyboard and screen reader users lost. inert switches off focus, clicks, text selection and the accessibility tree at once for a whole subtree, and nothing inside can leak out of it.

The key idea

One attribute switches off focus, clicks and screen readers at once

Common mistakes

Try it in this playground