---
title: "Use cases for aria-expanded"
url: https://daily.dev/posts/use-cases-for-aria-expanded-tgq9kcgth
source_url: https://piccalil.li/blog/use-cases-for-aria-expanded
type: article
source: "Piccalilli"
published: 2026-07-16T12:12:27.360Z
updated: 2026-07-16T12:12:51.523Z
tags: ["html", "accessibility", "web-components"]
reading_time: 11
upvotes: 9
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Use cases for aria-expanded

**[Piccalilli](https://daily.dev/sources/piccalilli)** · 11 min read · 9 upvotes · 0 comments

## Summary

A practical guide to correctly using the aria-expanded attribute in web development. Covers two main categories of collapsible widgets: collapsible sections (disclosure widgets, accordions) and collapsible interactive elements (navigation, menus, tree views, combo boxes). For each pattern, the appropriate ARIA attributes are explained with code examples. Also covers similar patterns like dialogs, tabbed interfaces, and tooltips that use aria-haspopup or aria-modal instead of aria-expanded. Highlights how modern HTML native elements (details/summary, dialog) and browser APIs (Popover, Invoker Commands) can often replace custom ARIA implementations entirely, reducing JavaScript dependency.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://piccalil.li/blog/use-cases-for-aria-expanded>

---

Tags: [#html](https://daily.dev/tags/html), [#accessibility](https://daily.dev/tags/accessibility), [#web-components](https://daily.dev/tags/web-components)

[View this post on daily.dev](https://daily.dev/posts/use-cases-for-aria-expanded-tgq9kcgth)
