json-schema-org / json-schema-org/website
🐛 Bug: Sidebar sub-navigation does not auto-collapse
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 169
- Forks
- 484
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 6
Description
Describe the bug
The documentation sidebar allows multiple sub-navigation sections to remain expanded at the same time. When a new section is opened, the previously expanded section stays open.
This results in a cluttered sidebar and makes navigation harder, especially as more sections are expanded.
This behavior differs from the commonly expected accordion-style navigation used in documentation sidebars, where only one section is expanded at a time.
Steps To Reproduce
- Open any documentation page.
- Expand a sidebar section (e.g. Get Started).
- Expand another sidebar section (e.g. Guides).
- Observe that the previously expanded section remains open.
Expected Behavior
When a sidebar sub-navigation section is expanded, any previously expanded section should automatically collapse.
Only one sidebar section should be expanded at a time.
Actual Behaviour
Multiple sidebar sections can remain expanded simultaneously.
Why this matters
- Reduces visual clutter in the sidebar
- Improves scanability and navigation speed
- Aligns with common accordion navigation patterns used in docs sites
- Simplifies focus for keyboard and screen reader users
Screenshots/Clips
https://github.com/user-attachments/assets/2bfed81c-8262-40be-be1b-5e797eec152e
Device Information [optional]
- **OS:** macOS
- **Browser:** Firefox/Chrome
Additional Notes
This appears to be a UI state-management issue where expanded sections are handled independently rather than as a single active section.
Are you working on this issue?
Yes
Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the sidebar behavior on a documentation page: expand Get Started, then Guides, and confirm both remain open. Trace the sidebar's expanded-section state management, then verify that opening one section collapses the previously expanded section and that only one section remains open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100