json-schema-org / json-schema-org/website

🐛 Bug: Sidebar sub-navigation does not auto-collapse

Open
#2,197 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🐛 Bug Status: Triage
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
  1. Open any documentation page.
  2. Expand a sidebar section (e.g. Get Started).
  3. Expand another sidebar section (e.g. Guides).
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.