Skip to content

FAQ has no way to expand or collapse every answer at once #38

Description

@pushpam2404

Context

There are twelve questions. Somebody scanning for one specific thing has to click each one, and somebody who wants to read the lot has to click twelve times.

What to change

Files: faq.html, and a small script

Requirements:

  • Add Expand all and Collapse all controls above the questions
  • They work by toggling the open attribute on each <details>
  • The buttons must be real <button> elements, not links
  • If JavaScript is off, the buttons should not appear at all rather than sit there doing nothing

Acceptance criteria

  • Expand all opens every answer, collapse all closes them
  • Individual questions still toggle normally afterwards
  • Keyboard accessible
  • With JavaScript disabled the page still works and the buttons are absent

How to verify locally

python3 -m http.server 8000

Then open http://localhost:8000.

Difficulty

Beginner. Around ten lines of JavaScript.


New here? Comment /claim on this issue and a bot will assign it to you. Then read CONTRIBUTING.md.

Stuck at any point? Comment here saying what you have tried and where it stopped working — that is not an admission of failure, it is how we find out the instructions were unclear. You can also come to a PR Debug Clinic (Oct 12 or Oct 21).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

difficulty: beginnerNo prior knowledge of the codebase neededdomain: os-devxOpen Source & Developer ExperienceenhancementNew feature or requestgood first issueGreat for your very first pull requesthacktoberfestCounts toward Hacktoberfest 2026status: claimedAssigned to a contributor — do not start work on this

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions