Frequently Asked Questions
This is a self-contained FAQ accordion. Everything — markup, styles, and behavior — lives in a single HTML file, so it works offline with no build step and no network requests.
Click a question (or focus it and press Enter or Space) to expand its
answer. Click it again to collapse it. The button's
aria-expanded attribute always reflects the current state.
Yes. Each item toggles independently, so you can expand as many answers as you like and collapse them in any order.
Each question is a real <button> inside a heading, with
aria-expanded announcing state and
aria-controls pointing at its panel. Panels use the
hidden attribute when collapsed, so they stay out of the
accessibility tree until opened.