Two approaches: a custom button-controlled region and the native HTML details element. Both examples wrap each widget with a div that has an example class, and use a container for controlled content with a details class.
This is a custom controlled content region. It uses a button with aria-expanded and aria-controls to toggle visibility of this container.
details class.This uses the native <details> and <summary> elements with the details class applied to the container.
Tips:
aria-expanded on the toggle control.aria-controls.details class to the content container.