5 Disclosure variations from the W3C ARIA Authoring Practices Guide.
Disclosure (Card)
An expandable card keeps its heading, link, and concise disclosure button separate. Clicking noninteractive summary text toggles details; links, form controls, text selection, and expanded content keep their own behavior.
<axxy-scope>
<article aria-roledescription="disclosure card">
<h3 id="card-title">Designing for everyone</h3>
<p>
A practical workshop with
<a href="#speaker">Alex Morgan</a>
.
</p>
<p>Thursday, 10:00–11:30 · Studio 2</p>
<button id="card-button" aria-labelledby="card-title card-button">Details</button>
<div>
<p>Practice accessible forms, labels, and keyboard navigation in a small group.</p>
<label>
<input type="checkbox">
Send me the workshop notes
</label>
</div>
</article>
<p id="speaker">Alex Morgan leads the museum’s design workshops.</p>
</axxy-scope>
Disclosure (FAQ)
Independent questions reveal their answers. Several answers may remain expanded at once.
<axxy-scope>
<figure>
<svg viewBox="0 0 320 160" width="320" role="img" aria-labelledby="chart-title chart-description">
<title id="chart-title">Museum visits by month</title>
<desc id="chart-description">Visits increased from January to March. Exact figures are available in the data table.</desc>
<path d="M45 15V130H305" fill="none" stroke="currentColor"/>
<rect x="65" y="90" width="45" height="40" fill="#005a9c"/>
<rect x="145" y="60" width="45" height="70" fill="#005a9c"/>
<rect x="225" y="30" width="45" height="100" fill="#005a9c"/>
<text x="67" y="150">Jan</text>
<text x="147" y="150">Feb</text>
<text x="227" y="150">Mar</text>
</svg>
<figcaption>Museum visits, first quarter</figcaption>
</figure>
<button aria-expanded="false">Show data table</button>
<div>
<table>
<caption>Monthly museum visits</caption>
<thead>
<tr>
<th scope="col">Month</th>
<th scope="col">Visits</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">January</th>
<td>400</td>
</tr>
<tr>
<th scope="row">February</th>
<td>700</td>
</tr>
<tr>
<th scope="row">March</th>
<td>1,000</td>
</tr>
</tbody>
</table>
</div>
</axxy-scope>
Disclosure (Navigation Menu)
A museum navigation bar with disclosure buttons and ordinary nested links. Only one dropdown is open at a time; this is site navigation, with native list semantics.
Collections. Discover the museum at your own pace.
Exhibitions. Discover the museum at your own pace.
Visit
Opening times. Discover the museum at your own pace.
Directions. Discover the museum at your own pace.
Learn
Workshops. Discover the museum at your own pace.
Resources. Discover the museum at your own pace.
Keyboard interaction
Tab and Shift+Tab visit visible buttons and links. Enter or Space toggles a disclosure. Escape closes it and returns focus to its button. Arrow keys, Home and End supplement Tab in this example. Moving focus or clicking outside closes the dropdown.
Events
Listen on the widget or delegate to <axxy-scope> or document. All custom events bubble.
axxy-disclosure-change — Dispatched when a disclosure panel expands or collapses. (target: Trigger <button>, detail: { expanded: boolean, panel: HTMLElement })
<axxy-scope>
<nav aria-label="Museum">
<ul class="disclosure-navigation">
<li>
<button >Explore</button>
<ul>
<li>
<a href="#destination-0-0">Collections</a>
</li>
<li>
<a href="#destination-0-1">Exhibitions</a>
</li>
</ul>
</li>
<li>
<button >Visit</button>
<ul>
<li>
<a href="#destination-1-0">Opening times</a>
</li>
<li>
<a href="#destination-1-1">Directions</a>
</li>
</ul>
</li>
<li>
<button >Learn</button>
<ul>
<li>
<a href="#destination-2-0">Workshops</a>
</li>
<li>
<a href="#destination-2-1">Resources</a>
</li>
</ul>
</li>
</ul>
</nav>
<section aria-labelledby="museum-content">
<h3 id="museum-content">Museum guide</h3>
<h4 id="destination-0">Explore</h4>
<p id="destination-0-0">
<strong>Collections.</strong>
Discover the museum at your own pace.
</p>
<p id="destination-0-1">
<strong>Exhibitions.</strong>
Discover the museum at your own pace.
</p>
<h4 id="destination-1">Visit</h4>
<p id="destination-1-0">
<strong>Opening times.</strong>
Discover the museum at your own pace.
</p>
<p id="destination-1-1">
<strong>Directions.</strong>
Discover the museum at your own pace.
</p>
<h4 id="destination-2">Learn</h4>
<p id="destination-2-0">
<strong>Workshops.</strong>
Discover the museum at your own pace.
</p>
<p id="destination-2-1">
<strong>Resources.</strong>
Discover the museum at your own pace.
</p>
</section>
</axxy-scope>
Disclosure (Navigation with Links)
Each section has both a normal destination link and a separate button for related pages. Opening a dropdown does not change the link’s native navigation behavior.
Collections. Discover the museum at your own pace.
Exhibitions. Discover the museum at your own pace.
Visit
Opening times. Discover the museum at your own pace.
Directions. Discover the museum at your own pace.
Learn
Workshops. Discover the museum at your own pace.
Resources. Discover the museum at your own pace.
Keyboard interaction
Tab and Shift+Tab visit visible buttons and links. Enter or Space toggles a disclosure. Escape closes it and returns focus to its button. Arrow keys, Home and End supplement Tab in this example. Moving focus or clicking outside closes the dropdown.
Events
Listen on the widget or delegate to <axxy-scope> or document. All custom events bubble.
axxy-disclosure-change — Dispatched when a disclosure panel expands or collapses. (target: Trigger <button>, detail: { expanded: boolean, panel: HTMLElement })
<axxy-scope>
<nav aria-label="Museum">
<ul class="disclosure-navigation">
<li>
<a href="#destination-0">Explore</a>
<button aria-label="More explore pages">More</button>
<ul>
<li>
<a href="#destination-0-0">Collections</a>
</li>
<li>
<a href="#destination-0-1">Exhibitions</a>
</li>
</ul>
</li>
<li>
<a href="#destination-1">Visit</a>
<button aria-label="More visit pages">More</button>
<ul>
<li>
<a href="#destination-1-0">Opening times</a>
</li>
<li>
<a href="#destination-1-1">Directions</a>
</li>
</ul>
</li>
<li>
<a href="#destination-2">Learn</a>
<button aria-label="More learn pages">More</button>
<ul>
<li>
<a href="#destination-2-0">Workshops</a>
</li>
<li>
<a href="#destination-2-1">Resources</a>
</li>
</ul>
</li>
</ul>
</nav>
<section aria-labelledby="museum-content">
<h3 id="museum-content">Museum guide</h3>
<h4 id="destination-0">Explore</h4>
<p id="destination-0-0">
<strong>Collections.</strong>
Discover the museum at your own pace.
</p>
<p id="destination-0-1">
<strong>Exhibitions.</strong>
Discover the museum at your own pace.
</p>
<h4 id="destination-1">Visit</h4>
<p id="destination-1-0">
<strong>Opening times.</strong>
Discover the museum at your own pace.
</p>
<p id="destination-1-1">
<strong>Directions.</strong>
Discover the museum at your own pace.
</p>
<h4 id="destination-2">Learn</h4>
<p id="destination-2-0">
<strong>Workshops.</strong>
Discover the museum at your own pace.
</p>
<p id="destination-2-1">
<strong>Resources.</strong>
Discover the museum at your own pace.
</p>
</section>
</axxy-scope>