Good accessibility usually starts with clear words and the right HTML elements, not a large amount of extra code.
What You Need to Know
Hidden, inert, and aria-hidden answer different questions. Hidden normally removes content from display, inert prevents interaction with a region, and aria-hidden affects what assistive technology is told. These are not interchangeable shortcuts.
In this example: compare a closed panel with inert content.
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
- Hidden, inert, and aria-hidden answer different questions.
- 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.