An expandable section is used to support progressive disclosure in a form or page by hiding additional content when you don't want it to be shown by default.
Keyboard users should be able to navigate to the expandable section toggle and use Enter or Space to show or hide the expandable content. Tab order should also be preserved within the expandable content, so all interactable elements in the expandable content should follow the expandable section toggle in the tab order.
Screen reader users should be informed that the expandable section toggle is interactable, and whether the state of its
associated expandable content is expanded or collapsed using the
aria-expanded attribute. The screen reader user should also be able to access the expanded expandable
content. When the expandable content is detached from the expandable section toggle, the expandable content's
id should be set as the value of the
expandable section toggle's
The following props/attributes have been added for you and are customizable in PatternFly:
Which HTML element it appears on in markup
Id of the expandable section, associates this content with its toggle button.
Associates this toggle button with the content that it reveals and hides.
View source on GitHub