Leave Yamada UI a star

Star
Yamada UIYamada UIv1.7.2

Accordion

Accordion is a component of a list that unfolds and collapses information.

Source@yamada-ui/accordion

Accordion follows the WAI-ARIA - Accordion Pattern for accessibility.

Keyboard Navigation

KeyDescriptionState
TabFocuses the first item when focus moves to the accordion. Focuses the next item if already within the accordion.-
Shift + TabFocuses the previous item that is not disabled.-
ArrowUpFocuses the previous item that is not disabled. If it's the first item, focuses the last item that is not disabled.-
ArrowDownFocuses the next item that is not disabled. If it's the last item, focuses the first item that is not disabled.-
Space, EnterExpands the panel of the focused item.-
Expands the panel of the focused item and collapses it if it is already expanded.isMultiple={true}, isToggle={true}
HomeFocuses the first item that is not disabled.-
EndFocuses the last item that is not disabled.-

ARIA Roles and Attributes

ComponentRole and AttributesUsage
AccordionLabelrole="heading"Indicates that it is a heading.
aria-level="3"Indicates that it is at hierarchy level 3.
aria-disabled="true"Sets to "true" when the panel of the item is expanded. However, if Accordion is set with isMultiple={true} or isToggle={true} and AccordionItem is not disabled, it does not become "true" as it can be collapsed.
idUsed to associate with AccordionPanel.
aria-controlsSets the id of the associated AccordionPanel.
aria-expandedSets to "true" when the panel of the item is expanded, and "false" when it is collapsed.
AccordionPanelrole="region"Indicates that it is a landmark region.
idUsed to associate with AccordionLabel.
aria-labelledbySets the id of the associated AccordionLabel.

Edit this page on GitHub

PreviousDisclosureNextTabs