Skip to content

docs(a11y): native single-open accordions via details name#83

Merged
jdevalk merged 1 commit into
mainfrom
standards-scan/exclusive-accordion-2026-07-08
Jul 8, 2026
Merged

docs(a11y): native single-open accordions via details name#83
jdevalk merged 1 commit into
mainfrom
standards-scan/exclusive-accordion-2026-07-08

Conversation

@jdevalk

@jdevalk jdevalk commented Jul 8, 2026

Copy link
Copy Markdown
Owner

What changed

Extends the Native interactive elements accessibility page to cover grouping <details> elements by a shared name attribute — the native single-open (exclusive) accordion pattern. Adds a worked How to implement subsection, a Common mistakes bullet, and bumps updated.

Why now

  • The 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.
  • The page already frames <details>/<summary> as the native disclosure primitive and shows ::details-content animation, but never mentions that a shared name gives 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 a div+class-toggle accordion provides.

Primary source

  • WHATWG HTML — the details element / attr-details-name (already cited on the page).

Status / changelog

  • No status change; this is a changed enrichment of an existing recommended page.
  • Includes a changed changelog 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

  • Opened as draft by the automated daily standards scan.
  • eslint + prettier --check passed via the pre-commit hook. npm run build could 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.
  • No new page, so no OG image or SKILL.md page-count change is required.

🤖 Generated with Claude Code

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>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying specification-website with  Cloudflare Pages  Cloudflare Pages

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

View logs

@jdevalk jdevalk marked this pull request as ready for review July 8, 2026 06:52
@jdevalk jdevalk merged commit 7ae265a into main Jul 8, 2026
8 checks passed
@jdevalk jdevalk deleted the standards-scan/exclusive-accordion-2026-07-08 branch July 8, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant