Skip to content

Align accordion examples with W3 - APG patterns and mark form solutions as deprecated#473

Open
rudigier wants to merge 4 commits intomainfrom
feature/468-accordion
Open

Align accordion examples with W3 - APG patterns and mark form solutions as deprecated#473
rudigier wants to merge 4 commits intomainfrom
feature/468-accordion

Conversation

@rudigier
Copy link
Copy Markdown
Collaborator

@rudigier rudigier commented Apr 1, 2026

  • create details/summary example
  • update accordion docs to recommend ARIA and details/summary patterns
  • mark radio/checkbox implementations as legacy in docs and example metadata
  • unify accordion example structure, content, classes, and visual styling
  • make +/- indicators decorative (aria-hidden) and keep behavior consistent
    See Radio button accordion example should be marked as legacy or updated #468

…ontrol variants as legacy, refs. #468

- update accordion docs to recommend ARIA and details/summary patterns
- mark radio/checkbox implementations as legacy in docs and example metadata
- unify accordion example structure, content, classes, and visual styling
- make +/- indicators decorative (aria-hidden) and keep behavior consistent
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for accessibility-developer-guide ready!

Name Link
🔨 Latest commit 88ceb5a
🔍 Latest deploy log https://app.netlify.com/projects/accessibility-developer-guide/deploys/69d03759f768f5000820d74e
😎 Deploy Preview https://deploy-preview-473--accessibility-developer-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rudigier rudigier requested a review from RA11y1 April 1, 2026 21:31

- A `<summary>` works as the interactive header.
- The surrounding `<details>` element manages expanded/collapsed state natively.
- This can reduce JavaScript and complexity compared to fully custom widgets.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: This removes the need for JavaScript compared to fully custom widgets.

- The surrounding `<details>` element manages expanded/collapsed state natively.
- This can reduce JavaScript and complexity compared to fully custom widgets.

For more complex behaviours and full APG-style keyboard interaction parity, prefer the ARIA implementation above.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Could we give any indication on what we consider "complex"?

@backflip
Copy link
Copy Markdown
Collaborator

backflip commented Apr 2, 2026

This is great and the unification makes a lot of sense. 🎉

@backflip
Copy link
Copy Markdown
Collaborator

backflip commented Apr 2, 2026

TBD: Either consolidate both legacy examples in README or completely remove radio block (because "exclusive" accordions are bad anyway).

@rudigier rudigier requested a review from backflip April 3, 2026 09:34
@rudigier
Copy link
Copy Markdown
Collaborator Author

rudigier commented Apr 3, 2026

Description and examples are adjusted.

Comment thread gulp/helpers/markdown.js Outdated
token.children.some((childToken, childIdx) => {
exampleLink = examples.getLink(childToken)

// Add title
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice approach! Would you mind changing this comment to Add example embedding (unless line contains "legacy" keyword)?

@backflip backflip self-requested a review April 3, 2026 13:07
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.

2 participants