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

[Website]: Accordions expanded by default #29

Closed
joshbruce opened this issue Aug 1, 2016 · 2 comments
Closed

[Website]: Accordions expanded by default #29

joshbruce opened this issue Aug 1, 2016 · 2 comments

Comments

@joshbruce
Copy link
Contributor

Issue type

  • Website

What happened

Many of the accordions on the site specify whether they are collapsed or not.

uswds/uswds#1122

The solution offered was to have the accordions expanded by default and have JS collapse them on page load. Therefore, there is no need to specify an accordion as collapsed - only whether it should be expanded on page load. Example:

<!-- NO --> 
<button class="usa-button-unstyled" aria-expanded="false" aria-controls="collapsible-0">
  Accordion title
</button>
<div id="collapsible-0" class="usa-accordion-content" aria-hidden="true">
  <pre><code class="language-markup">
    <!-- some markup -->
  </code></pre>
</div>

<!-- YES - collapsed by default --> 
<button class="usa-button-unstyled" aria-controls="collapsible-0">
  Accordion title
</button>
<div id="collapsible-0" class="usa-accordion-content">
  <pre><code class="language-markup">
    <!-- some markup -->
  </code></pre>
</div>

<!-- YES - expanded by default --> 
<button class="usa-button-unstyled" aria-expanded="true" aria-controls="collapsible-0">
  Accordion title
</button>
<div id="collapsible-0" class="usa-accordion-content" aria-hidden="false">
  <pre><code class="language-markup">
    <!-- some markup -->
  </code></pre>
</div>

Probably going to be related to #26

What I expected

Accordions would be using the latest solution from the USWDS.

Steps to reproduce the issue [optional]

  1. Open /_includes/elements/actions.html - see accordions
@joshbruce
Copy link
Contributor Author

Because this is going to effect a lot of pages - maybe this should be a milestone?

@joshbruce
Copy link
Contributor Author

Solved with the good work of @anuragmundada-reisys - Thanks!

See #37 and related PRs.

diego-ruiz pushed a commit that referenced this issue May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant