Skip to content

feat(accordion): add accordion component main behaviors #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pixu1980
Copy link
Member

@pixu1980 pixu1980 commented May 9, 2025

  • handles only <details> element children
  • if <details> child is a "wcag-details" the "wcag-details.toggle" event is handled and a "wcag-accordion.toggle" is emitted
  • name attribute is watched and updates all the name attributes of <details> children
  • name can be updated/read with public setter/getter
  • a mutation observer watches for attribute changes and for childList changes, updating every <details> child with the proper name attribute
  • is the name attribute is not present, there's a {{UUID}}-accordion fallback

@pixu1980 pixu1980 added the enhancement New feature or request label May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants