govau/design-system-components

Accordion wrap toggle button in a heading level

Open

#867 geöffnet am 7. Aug. 2019

Auf GitHub ansehen
 (5 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)HTML (115 Forks)batch import
accessibilitygood first issuemodule: accordion

Repository-Metriken

Stars
 (741 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

For consideration:

Headings (hx) should be used to wrap the accordion triggering button. This would align with the recommendations of the ARIA 1.1 Practices Guide. The heading level as the first element in the <section>s will also align to the recommendations for the <section> element in the HTML 5.1 W3C Recommendation.

Accordion (Sections With Show/Hide Functionality) https://www.w3.org/TR/wai-aria-practices-1.1/#accordion

The section element https://www.w3.org/TR/2016/REC-html51-20161101/sections.html#the-section-element

<section class="au-accordion"> <h3> <button class="au-accordion__title js-au-accordion" aria-controls="accordion-default" aria-expanded="true" onclick="return AU.accordion.Toggle( this )"> Accordion title </button> </h3> <div class="au-accordion__body" id="accordion-default"> <div class="au-accordion__body-wrapper"> Here <a href="#url">is</a> some accordion content </div> </div> </section>

Contributor Guide