Content · Web Development · HTML

HTML Hidden Content: Hidden vs Aria-Hidden vs Inert

Hidden Content: Hidden vs Aria-Hidden vs Inert: Try moving through the elements with a keyboard. The labels and relationships matter even when no extra styling has been added. Includes a practical HTML example and an explanation.

1 views Published Oct 19, 2026 Updated Oct 19, 2026 Admin

Not everyone uses a mouse to explore a website. Good HTML must also make sense through a keyboard or screen reader.

What You Need to Know


A hidden region, an aria-hidden region, and an inert region can behave differently for keyboard users and screen readers. Before choosing one, decide whether the content should disappear, become noninteractive, or simply stop being announced.

Try the Example


Take a look at the example. We’ll explain the important lines right below it.

<button type="button">
    <span aria-hidden="true">+</span>
    Add item
</button>
<p hidden>This paragraph is removed from display and normal accessibility exposure.</p>

Let’s Read the Code


  • hidden: Hidden removes content from ordinary presentation; some special values have different behavior.
  • <button>: The button offers an action; its type or command determines what happens.
  • type: Type changes what sort of control or resource the browser uses.
  • aria-hidden: Aria-hidden hides content from the accessibility tree, not necessarily from the screen.

Read the named elements and attributes together. They explain how the browser connects this feature to the rest of the page.

What Happens in the Browser?


Try this with Tab and Shift+Tab. If you can, inspect the accessibility tree too; appearance alone does not tell the whole story.

What does assistive technology receive? The example includes aria-hidden. These relationships can explain names, states, or descriptions when used correctly. They do not automatically move focus, listen for clicks, or create keyboard handling.

Your Turn


Move through the example without a mouse. Read each control name and current state aloud as if describing it to a friend.

Common Beginner Mistakes


  • Expecting ARIA alone to create keyboard behavior or make a control interactive.
  • ARIA changes what assistive technology is told; it does not automatically add keyboard controls, visual styling, or JavaScript behavior.

Key Takeaways


  • A hidden region, an aria-hidden region, and an inert region can behave differently for keyboard users and screen readers.
  • hidden: Hidden removes content from ordinary presentation; some special values have different behavior.
  • A meaningful HTML element is usually a stronger starting point than adding an ARIA role to a generic div. Also check what happens using only the keyboard.
Share this resourceSend this page to someone who may find it useful.