Skip to content

WCollapsibleToggle

marksreeves edited this page Nov 19, 2015 · 17 revisions

WCollapsibleToggle is a component which outputs a tool used to expand or collapse a group of WCollapsibles.

Screenshot of a typical implementation

Screen shot of WCollapsibleToggle

HTML output

WCollapsibleToggle outputs a HTML ul element with two list items: one to expand all and one to collapse all. The ul element has a WAI-ARIA role of radiogroup. The items each contain a HTML button element with a WAI-ARIA role of radio since their selection is mutually exclusive.

Positioning WCollapsibleToggle

A WCollapsibleToggle should appear before the controlled WCollapsibles. It may be deemed an accessibility failure if a control alters the state of the page ahead of the current cursor point.

Using WCollapsibleToggle

A WCollapsibleToggle should only be specified when a group of WCollapsibles exists on a single screen and it is reasonable for the user to expand (or collapse) them all. You should probably avoid specifying a WCollapsibleToggle if the group consists of only a single WCollapsible or if it is not desirable or reasonable for the user to expand all WCollapsibles at once.

Related components

Further information

Clone this wiki locally