Pivot Docs

    Accordion Open in Figma

    The Accordion Component is a collapsible content container that allows users to show and hide sections of related content in a compact, organized manner. It enables content authors to present information in digestible chunks while maintaining a clean interface that doesn't overwhelm users with too much content at once.

    pivot-accordion-default is a container web component that groups pivot-accordion-item elements. Multiple items can be open simultaneously. For card-styled items with single-open behavior, use pivot-accordion-elevated.


    Quick Start

    <pivot-accordion-default>
    <pivot-accordion-item pivot-item-label="Section 1">
    <p>Content for section 1</p>
    </pivot-accordion-item>
    <pivot-accordion-item pivot-item-label="Section 2">
    <p>Content for section 2</p>
    </pivot-accordion-item>
    </pivot-accordion-default>

    Using the default slot

    The default (unnamed) slot is the only slot pivot-accordion-default renders. It is designed to accept pivot-accordion-item elements as its slotted content:

    <pivot-accordion-default>
    <pivot-accordion-item pivot-item-label="Section 1">
    <p>Content for section 1</p>
    </pivot-accordion-item>
    <pivot-accordion-item pivot-item-label="Section 2">
    <p>Content for section 2</p>
    </pivot-accordion-item>
    </pivot-accordion-default>

    CSS Parts

    Name Description
    container The outer wrapper div element

    Accessibility

    pivot-accordion-default is an implicit grouping container and does not carry its own ARIA role — it renders a single unadorned <div part="container"> wrapping the slotted items. This matches the ARIA APG Accordion Pattern, which does not require a container role; the accessible name/role/value semantics (WCAG 4.1.2) are provided entirely by the pivot-accordion-item elements inside it.

    Screen Reader Behavior

    Screen readers encounter each accordion header button individually, in document order. The container itself is not announced and exposes no accessible name of its own.

    Keyboard Navigation

    pivot-accordion-default does not attach any keyboard handlers itself. Users navigate between accordion headers with Tab and Shift+Tab, or with arrow keys, Home, and End — all handled within pivot-accordion-item (see its README for the full key table). Because pivot-accordion-item’s arrow-key traversal queries its parent for sibling items, using pivot-accordion-default as the common parent is what makes that traversal work across the whole group (WCAG 2.1.1).

    Focus Management

    Focus is managed entirely within individual pivot-accordion-item elements (via delegatesFocus). pivot-accordion-default does not manipulate focus, set tabindex, or trap focus in any way.


    Related Components

    • Accordion Elevated — card-styled, single-open variant of this container.
    • Accordion Item — the disclosure component pivot-accordion-default composes; see its README for the pivot-accordion-item-toggle event detail, per-item properties, and item-level accessibility behavior.
    • Accordion Stand Alone — use if only one accordion is needed.

    References


    API Reference

    Slots

    Name Description
    default Default slot; accepts `pivot-accordion-item` elements