HTML & CSS · Senior · Question 35 of 75
What does the inert attribute do?
- 1Disables CSS animations and transitions inside the element and its descendants
- ✓Correct answer: Makes a subtree non-interactive and hidden from assistive technologies
- 3Prevents the browser from repainting the element until it's removed
Explanation
inert is the native way to "switch off" part of a page: for example, the main content while a drawer is open. Previously you had to manually set tabindex="-1" on every focusable element plus aria-hidden. A modal <dialog> makes the rest of the document inert automatically.