Skip to content
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

Refactor Accordion Elements to Use Semantic HTML #587

Open
martyanovandrey opened this issue Dec 17, 2024 · 0 comments
Open

Refactor Accordion Elements to Use Semantic HTML #587

martyanovandrey opened this issue Dec 17, 2024 · 0 comments
Labels

Comments

@martyanovandrey
Copy link
Contributor

Our current accordion component is implemented using <div> elements, which can hinder accessibility and semantic clarity. To improve the semantic structure and accessibility of our accordions, we should refactor them to use HTML5 semantic tags.

Proposed Changes:

  • Replace <div> containers with <details> and <summary> elements. The <details> element acts as a native expandable container, while <summary> provides a visible title for the accordion.
  • Ensure that the accordion state (expanded/collapsed) is properly managed using these semantic elements.

Benefits:

  • Improves semantic meaning and accessibility for assistive technology users.
  • Reduces the need for additional JavaScript to manage accordion behavior.
  • Enhances SEO by using proper semantic tags.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant