Auto collapse accordion AMP
If you add an expand-single-section attribute to the AMP accordion then all other sections will auto-collapse except the active section that has been clicked.
<amp-accordion class="myaccordion" expand-single-section>
<p>Content of Section 1</p>
<p>Content od Section 2</p>
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool
Search Index Data (The code snippet can also be found with below search text)
Show active section only AMP accordion