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

[WIP] Add accordion elements #49

Merged
merged 24 commits into from
Jun 30, 2015
Merged

Conversation

shawnbot
Copy link
Contributor

I started this as a Custom Element implementation, but then decided against it and went with a variation on this practical ARIA example. It expects HTML in the form:

<div class="picc-accordion">
  <h1>
    <a aria-expanded="false" aria-controls="accordion-content">
      Click me to expand
    </a>
  </h1>
  <div id="accordion-content" aria-hidden="true">
    <p>This content will be hidden by default, and shown when the heading is clicked.</p>
  </div>
</div>

Hey @nickbristow, can you tell me if it's okay to use <a> instead of <button> for the clickable heading? Do I need to use aria-role="button" if it's an anchor, or add tabindex="0" in either case? The anchor implementation doesn't appear to allow use of the keyboard to "click" it.

meiqimichelle added a commit that referenced this pull request Jun 30, 2015
[WIP] Add accordion elements
@meiqimichelle meiqimichelle merged commit 9c76deb into 18f-pages-staging Jun 30, 2015
@meiqimichelle meiqimichelle deleted the feature-accordion branch June 30, 2015 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants