Align accordion examples with W3 - APG patterns and mark form solutions as deprecated#473
Open
Align accordion examples with W3 - APG patterns and mark form solutions as deprecated#473
Conversation
…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
✅ Deploy Preview for accessibility-developer-guide ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
backflip
reviewed
Apr 2, 2026
|
|
||
| - 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. |
Collaborator
There was a problem hiding this comment.
Suggestion: This removes the need for JavaScript compared to fully custom widgets.
backflip
reviewed
Apr 2, 2026
| - 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. |
Collaborator
There was a problem hiding this comment.
Question: Could we give any indication on what we consider "complex"?
Collaborator
|
This is great and the unification makes a lot of sense. 🎉 |
Collaborator
|
TBD: Either consolidate both legacy examples in README or completely remove radio block (because "exclusive" accordions are bad anyway). |
Collaborator
Author
|
Description and examples are adjusted. |
backflip
reviewed
Apr 3, 2026
| token.children.some((childToken, childIdx) => { | ||
| exampleLink = examples.getLink(childToken) | ||
|
|
||
| // Add title |
Collaborator
There was a problem hiding this comment.
Nice approach! Would you mind changing this comment to Add example embedding (unless line contains "legacy" keyword)?
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.
See Radio button accordion example should be marked as legacy or updated #468