Written with AI assistance and disclosed as fully AI-generated in the editor. The example is a standalone demo, not a report about a client site.
A common FAQ bug starts with an attempt to animate the answer: the animation becomes responsible for hiding content, and the developer has to keep ARIA state, focus and visual state in sync. For a simple FAQ the browser can own the interaction. CSS is optional.
Make it work in HTML first
<details class = "disclosure" > <summary> What should I bring to the first call? </summary> <p> Bring one example of the page that is causing confusion. </p> </details>
Enter fullscreen mode
Exit fullscreen mode
Use a summary label that makes sense by itself. Keep links and other actions in the answer. Don’t add a second button, an onclick handler or manually updated aria-expanded just to duplicate the built-in interaction.
Add animation only when motion is welcome
.disclosure { max-inline-size : 42rem ; border : 1px solid #687385 ; border-radius : .…