---
title: "Non-interactive Elements with the inert attribute"
description: "The HTML inert attribute disables focus, clicks, text selection and editing on an element and its descendants, and hides them from assistive technologies like aria-hidden=\"true\"."
url: "https://swe.quest/articles/non-interactive-elements-with-the-inert-attribute-966ae3b60cf7bc71"
canonical: "https://webkit.org/blog/12578/non-interactive-elements-with-the-inert-attribute/"
source: "WebKit"
published: "2022-04-26"
difficulty: "medium"
kind: "How-to"
reading_minutes: 3
tags: ["browsers","accessibility","frontend","css"]
---

# Non-interactive Elements with the inert attribute

A post on [WebKit](https://swe.quest/sources/webkit.md), published 2022-04-26, 3 min read, How-to. Original: [https://webkit.org/blog/12578/non-interactive-elements-with-the-inert-attribute/](https://webkit.org/blog/12578/non-interactive-elements-with-the-inert-attribute/)

## Summary

The HTML inert attribute disables focus, clicks, text selection and editing on an element and its descendants, and hides them from assistive technologies like aria-hidden="true". It replaces piecemeal workarounds such as disabled, tabindex="-1", pointer-events: none and user-select: none, each of which covers only part of the problem. A carousel example uses the inert DOM property in two lines to make inactive slides non-interactive, plus a CSS \[inert\] opacity cue. Support ships in Safari 15.5, Chrome 102 and Firefox Nightly, with a polyfill suggested for older browsers.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)
- [Accessibility](https://swe.quest/tags/accessibility.md) (Web & mobile)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [CSS](https://swe.quest/tags/css.md) (Web & mobile)

## Prerequisites

- HTML attributes
- DOM scripting
- basic CSS ([easy posts on CSS](https://swe.quest/tags/css.md?difficulty=easy))

## Keywords

inert attribute, WebKit, Safari, aria-hidden, pointer-events, user-select

## Related posts

- [New WebKit Features in Safari 15.5](https://swe.quest/articles/new-webkit-features-in-safari-15-5-b4bbee299beae982.md): WebKit · 2022-05-16 · Easy · 5 min read · Browsers, CSS, Accessibility, Application security
  Safari 15.5 is mostly a polish and bug-fix release, adding three developer-facing technologies: the HTML \`inert\` attribute, which makes an element non-interactive and hides it from assistive technologies; the CSP Level 3 \`worker-src\` directive for restricting worker script sources; and WKWebView \`minimumViewportInset\`/\`maximumViewportInset\` APIs so apps can support the new CSS small, large and dynamic viewport units.
- [The Focus-Indicated Pseudo-class :focus-visible](https://swe.quest/articles/the-focus-indicated-pseudo-class-focus-visible-82771fd0458dfee1.md): WebKit · 2022-01-31 · Medium · 4 min read · CSS, Accessibility, Browsers
  The :focus-visible pseudo-class lets authors style focus indicators only when the browser's own heuristics would draw one, such as during keyboard navigation or in text inputs, but not on a mouse click on a generic element.
- [The golden rule of Customizable Select](https://swe.quest/articles/the-golden-rule-of-customizable-select-f338a360afa66726.md): WebKit · 2026-06-15 · Medium · 3 min read · Accessibility, CSS, Browsers, Frontend
  Customizable select, arriving in Safari 27, lets developers fully style \`\<select\>\` elements with custom arrows, icons and swatches while keeping native keyboard navigation and accessibility semantics.
- [Introducing the Dialog Element](https://swe.quest/articles/introducing-the-dialog-element-9af9ed3251b7cd00.md): WebKit · 2022-02-07 · Medium · 4 min read · Browsers, Frontend, Accessibility, CSS
  Safari 15.4 beta and Safari Technology Preview 134 add the HTML \`\<dialog\>\` element, a native, accessible replacement for the script-blocking \`alert\`, \`confirm\` and \`prompt\` methods and for framework-built modals.
- [An HTML Switch Control](https://swe.quest/articles/an-html-switch-control-f6ff0673a2bcdfca.md): WebKit · 2024-02-28 · Medium · 3 min read · Browsers, Frontend, Accessibility, CSS
  Safari 17.4 adds a native HTML switch control via \`\<input type=checkbox switch\>\`, which falls back to a plain checkbox in browsers without support.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
