Skip to Main Content

Gleeson Library Design System

Administration, layout, components, and content guide for the Gleeson Library website.

Accordions

Accordions hide and reveal additional content when selected.

Example

Example

Usage

  • Platforms — Accordions can be used in LibGuides LibAnswers LibCal
  • Permission level — Accordions can be used by Regular and Admin users
  • Framework — Accordions are built on the Bootstrap 3 Collapse component

Content Guidelines

  • Brevity — Keep accordion content brief and focused
  • Clarity — Accordion titles and text should be descriptive and meaningful

Best Practices

  • Placement — Use accordions in the main content area of webpages; do not use accordions in the side navigation area of webpages
  • Groups — Use accordions in groups of two or more; do not use a single accordion
  • Responsive layout — Accordion panels are stacked vertically regardless of screen size

Accessibility

  1. ARIA roles — ARIA roles establish the semantic meaning of an element when it does not have a default HTML element; this ensures the accordions are accessible to assistive technologies
    • role="tab" is set on the headers or links that control the opening/closing
    • role="tabpanel" is set on each collapsible content section
  2. ARIA states — ARIA states describe the current condition of the elements that make up accordions
    • aria-expanded="true/false" indicates whether a section is open or closed
    • aria-controls links the header to the content it controls
  3. Keyboard navigation — Accordions are navigable by keyboards and have clearly defined focus indicators