docs(a11y): native single-open accordions via details name#83
Merged
Conversation
Group sibling <details> by a shared name for a JS-free exclusive accordion — native keyboard, focus, and disclosure semantics, and open state that survives back/forward navigation. Interoperable across all engines (Firefox shipped it in 130). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying specification-website with
|
| Latest commit: |
774d973
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5f17a8a9.specification-website.pages.dev |
| Branch Preview URL: | https://standards-scan-exclusive-acc.specification-website.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Extends the Native interactive elements accessibility page to cover grouping
<details>elements by a sharednameattribute — the native single-open (exclusive) accordion pattern. Adds a workedHow to implementsubsection, aCommon mistakesbullet, and bumpsupdated.Why now
name-grouping behaviour is interoperable across every engine, verified via MDN BCD (html.elements.details.name): Chrome/Edge 120 and Safari 17.2 (Dec 2023), Firefox 130 (Sep 2024). Standard-track, non-experimental.<details>/<summary>as the native disclosure primitive and shows::details-contentanimation, but never mentions that a sharednamegives you a JS-free single-open accordion — the most common accordion requirement.Auditable outcome, not a build technique
Passes the outcome-not-technique bar (the one tightened on 2026-07-06). The "Why it matters" is phrasable for visitors, not the developer: a native single-open accordion gets keyboard activation, correct focus order,
aria-expanded/disclosure semantics, open-state that survives back/forward navigation and in-page find, and graceful degradation with JS disabled — none of which adiv+class-toggle accordion provides.Primary source
detailselement /attr-details-name(already cited on the page).Status / changelog
changedenrichment of an existingrecommendedpage.changedchangelog entry (2026-07-08-exclusive-accordion.md). This changelog call is borderline per CLAUDE.md — if you'd rather not surface a single-subsection addition in/changelog/, drop that one file before merge.Notes for the reviewer
eslint+prettier --checkpassed via the pre-commit hook.npm run buildcould not be run in the sandboxed routine environment (npm is blocked there) — CI is the build gate; please confirm the build is green before merging.🤖 Generated with Claude Code