Accordions

Accordions enable users to open and close sections of page content.

Coded Components

Helper classes: Looking for a complete list of helper classes for these components?View helper classes

Redlines: We don't include redline comps because it's always more accurate to use developer tools to inspect the coded components, or a plugin such as the Prism Redline Tool.

Show One Accordion

<div class="dds__accordion dds__mb-3" id="standard-accordion"> <div class="dds__accordion-card"> <div class="dds__accordion-card-header" id="heading-standard-one"> <h5 class="dds__mb-0"> <button class="dds__accordion-btn dds__d-flex" type="button" data-toggle="dds__collapse" data-parent="#standard-accordion" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> <i class="dds__icons dds__chevron-right" aria-hidden="true"></i> <span class="dds__mx-2">Headline title goes here </span> </button> </h5> </div> <div id="collapseOne" class="dds__collapse dds__show" aria-labelledby="heading-standard-one" aria-expanded="true" role="region"> <div class="dds__accordion-card-body"> The Content Area provides a space for displaying other patterns or content. The Content Area is not part of this pattern. This pattern rather controls the opening and closing of the content area. </div> </div> </div> <div class="dds__accordion-card"> <div class="dds__accordion-card-header" id="heading-standard-two"> <h5 class="dds__mb-0"> <button class="dds__accordion-btn dds__collapsed dds__d-flex" type="button" data-toggle="dds__collapse" data-parent="#standard-accordion" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo" role="button"> <i class="dds__icons dds__chevron-right" aria-hidden="true"></i> <span class="dds__mx-2">Headline title goes here </span> </button> </h5> </div> <div id="collapseTwo" class="dds__collapse" aria-labelledby="heading-standard-two"> <div class="dds__accordion-card-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> <div class="dds__accordion-card"> <div class="dds__accordion-card-header" id="heading-standard-three"> <h5 class="dds__mb-0"> <button class="dds__accordion-btn dds__collapsed dds__d-flex" type="button" data-toggle="dds__collapse" data-parent="#standard-accordion" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> <i class="dds__icons dds__chevron-right" aria-hidden="true"></i> <span class="dds__mx-2">Headline title goes here </span> </button> </h5> </div> <div id="collapseThree" class="dds__collapse" aria-labelledby="heading-standard-three"> <div class="dds__accordion-card-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> </div>

Show Many Accordion

<div id="independent-accordion-showhide" class="dds__accordion dds__mb-3"> <div class="dds__show-hide-container"> <button id="indpt-show-all-btn" class="dds__btn-link dds__show-all" aria-expanded="false"> <span>Show All</span> </button> | <button id="indpt-hide-all-btn" class="dds__btn-link dds__hide-all" aria-expanded="false"> <span>Hide All</span> </button> </div> <div class="dds__accordion-card"> <div class="dds__accordion-card-header"> <h5 class="dds__mb-0"> <button class="dds__accordion-btn dds__d-flex" type="button" data-toggle="dds__collapse" data-target="#panelOneNested" aria-expanded="true" aria-controls="panelOneNested"> <i class="dds__icons dds__chevron-right" aria-hidden="true"></i> <span id="headline1" class="dds__mx-2">Headline 1 title goes here </span> </button> </h5> </div> <div id="panelOneNested" role="region" class="dds__collapse dds__show" aria-labelledby="headline1" aria-expanded="true"> <div class="dds__accordion-card-body"> The Content Area provides a space for displaying other patterns or content. The Content Area is not part of this pattern. This pattern rather controls the opening and closing of the content area. </div> <div class="dds__accordion-card-body"> <div class="dds__secondary-accordion"> <h5 class="dds__mb-0"> <button aria-label="Show / Hide content for Secondary Accordion" class="dds__secondary-accordion-btn dds__d-flex dds__collapsed" type="button" data-toggle="dds__collapse" data-target="#secondaryAccordionOne" aria-expanded="false" aria-controls="secondaryAccordionOne" role="button"> <i class="dds__icons dds__arrow-tri-solid-right" aria-hidden="true"></i> <span class="dds__mx-2"> More Data 1 </span> </button> </h5> <div id="secondaryAccordionOne" class="dds__collapse" aria-expanded="true" role="region"> <div class="dds__secondary-accordion-body dds__mb-2"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. </div> </div> </div> <div class="dds__secondary-accordion"> <h5 class="dds__mb-0"> <button aria-label="Show / Hide content for Secondary Accordion" class="dds__secondary-accordion-btn dds__d-flex dds__collapsed" type="button" data-toggle="dds__collapse" data-target="#secondaryAccordionTwo" aria-expanded="false" aria-controls="secondaryAccordionTwo"> <i class="dds__icons dds__arrow-tri-solid-right" aria-hidden="true"></i> <span class="dds__mx-2"> More Data 2 </span> </button> </h5> <div id="secondaryAccordionTwo" class="dds__collapse" aria-expanded="true" role="region"> <div class="dds__secondary-accordion-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. </div> </div> </div> </div> </div> </div> <div class="dds__accordion-card"> <div class="dds__accordion-card-header"> <h5 class="dds__mb-0"> <button class="dds__accordion-btn dds__collapsed dds__d-flex" type="button" data-toggle="dds__collapse" data-target="#panelTwoNested" aria-expanded="false" aria-controls="panelTwoNested" role="button"> <i class="dds__icons dds__chevron-right" aria-hidden="true"></i> <span id="headline2" class="dds__mx-2">Headline 2 title goes here </span> </button> </h5> </div> <div id="panelTwoNested" role="region" class="dds__collapse" aria-labelledby="headline2"> <div class="dds__accordion-card-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> <div class="dds__accordion-card"> <div class="dds__accordion-card-header"> <h5 class="dds__mb-0"> <button class="dds__accordion-btn dds__collapsed dds__d-flex" type="button" data-toggle="dds__collapse" data-target="#panelThreeNested" aria-expanded="false" aria-controls="panelThreeNested"> <i class="dds__icons dds__chevron-right" aria-hidden="true"></i> <span id="headline3" class="dds__mx-2">Headline 3 title goes here </span> </button> </h5> </div> <div id="panelThreeNested" role="region" class="dds__collapse" aria-labelledby="headline3"> <div class="dds__accordion-card-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> </div>

Secondary Accordion

<div class="dds__secondary-accordion"> <button aria-label="Show / Hide content for Secondary Accordion" class="dds__secondary-accordion-btn dds__d-flex dds__collapsed" type="button" data-toggle="dds__collapse" data-target="#secondaryAccordion" aria-expanded="false" aria-controls="secondaryAccordion"> <i class="dds__icons dds__arrow-tri-solid-right" aria-hidden="true"></i> <span class="dds__mx-2 dds__more"> Show more </span> <span class="dds__mx-2 dds__less"> Show less </span> </button> <div class="dds__collapse" id="secondaryAccordion" aria-expanded="true" role="region"> <div class="dds__secondary-accordion-body dds__my-2"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. </div> </div> </div>

Show More / Less List

<div> <div class="dds__show-hide"> <nav class="dds__mb-1" aria-label="Some example description"> <a class="dds__d-block" href="javascript:;">Link 1</a> <a class="dds__d-block" href="javascript:;">Link 2</a> <a class="dds__d-block" href="javascript:;">Link 3</a> <a class="dds__d-block" href="javascript:;">Link 4</a> <div class="dds__collapse dds__inner" id="collapseShowHideFromButtom" aria-expanded="false"> <a class="dds__d-block" href="javascript:;">Link 5</a> <a class="dds__d-block" href="javascript:;">Link 6</a> <a class="dds__d-block" href="javascript:;">Link 7</a> <a class="dds__d-block" href="javascript:;">Link 8</a> </div> </nav> </div> <button class="dds__secondary-accordion-btn dds__d-flex dds__collapsed" type="button" data-toggle="dds__collapse" data-target="#collapseShowHideFromButtom" aria-expanded="false" aria-controls="collapseShowHideFromButtom"> <span class="dds__mx-2 dds__more"> Show more </span> <span class="dds__mx-2 dds__less"> Show less </span> </button> </div>

No items found.

No items found.

Heading

No items found.

Usage

When to use an accordion component:

  • If users will only need a few specific pieces of content within a page.
  • If you have only a small space to display a lot of content.

When not to use an accordion component:

  • If users need to see most or all of the information on a page. Use well-formatted text instead.
  • If there is not enough content to warrant condensing. Accordions increase cognitive load and interaction cost, as users have to make decisions about what headers to click on.

Accordion

Content creators should be able to decide if one or more of an accordion's sections are open in its default state. Note that a Show One Accordion could not have more than one section open, by default.

The arrow of an accordion section points toward the current location of that section's content. When the section is closed, the arrow points to the right to indicate that the content is hidden within the link/heading. When an accordion section is open, the arrow points down at the exposed content.

Users can select anywhere on the row of an accordion link/heading to toggle that section open and closed.

Keyboard operation:i

  • Space or Enter = When focus is on the accordion header of a collapsed section, expands the section. When focus is on the header of an expanded section, collapses the section (unless one section must be open at all times).
  • Tab = Moves focus to the next focusable element. All focusable elements in the accordion are included in the page Tab sequence.
  • Shift + Tab = Moves focus to the previous focusable element. All focusable elements in the accordion are included in the page Tab sequence.
  • Down Arrow = When focus is on an accordion header, moves focus to the next accordion header. When focus is on last accordion header, either does nothing or moves focus to first accordion header.
  • Up Arrow = When focus is on an accordion header, moves focus to the previous accordion header. When focus is on first accordion header, either does nothing or moves focus to last accordion header.
  • Home = When focus is on an accordion header, moves focus to the first accordion header.
  • End = When focus is on an accordion header, moves focus to the last accordion header.

Show More / Show Less

When the user selects a "Show More" link option, it retains its position at the end of the content that's revealed, and is replaced with "Show Less".

Do's and Don'ts

Common Button Labels and Usage

Title case, 2-3 words maximum.
Do not combine actions in a label (exception: "Customize & Buy").
If standard labels don't fit the button's purpose, align label with the task the user is attempting.

Please refer to the Dell Technologies branding website, https://brand.delltechnologies.com/faq/#voice, for further information regarding call-to-action labels and usage.

Button Label:
Corresponding Action:
Add to Cart
Search
Cancel
Save
Edit
Delete
Continue
Next/Previous
Submit
Select
Sign In/Sign Out
View Details
Ok/Cancel
Learn More
Close
Takes users to Cart page, with item added
Used for search buttons
Takes users back to entry point for a task
Used to save an item
Navigates users to change an item
Deletes an item on the page, usually with a verification step
Used as progression
Used as forward and backward navigation (Next is primary, Previous is secondary)
Used to submit a task or info
Used for choosing items in a task flow
Authentication standard, for consistency do not use Log In/Log Out or Signin/Signout
Used instead of “Select” in cases of product details or within learn content
For use in modal verification steps when more specific CTAs will not fit due to space
Used to link users to more learning content or contextual help
Used within modal windows

Accessibility

The A11Y Style Guide has excellent examples of markup for accordions.

The W3C Web Accessibility Initiative (WAI) develops standards and support materials to help you understand and implement accessibility.

Please follow the best practices for accordions (show/hide functionality) from WAI-ARIA authoring practices 1.1.

You may also refer to this example of an accordion from WAI-ARIA practices 1.1.