Expand / Collapse Widget Examples

Each widget is wrapped in a div.example. The controlled content container uses the class="details".

Yes — you can set an expand/collapse widget to be open by default by marking the control's aria-expanded="true" and giving the content the open class. JavaScript will initialize this state so the visual and accessibility attributes match.