🐛 Bug: FAQ accordion scroll overshoots and hides question under the top navbar

Open
#2,473 3 comments 0 reactions 1 assignee View on GitHub

@kunalverma2512 is already working on this.

Since Aug 31, 2026.

Assessment

This issue has not been assessed yet.

Description

🐛 Bug Status: Triage
Describe the bug

The accordion should expand and scroll just enough to keep the content visible without clipping the top of the container under the header. The scrolling feature itself is actually super helpful for items near the bottom of the screen so the answer doesn't expand out of view so we definitely want to keep it but we just need to fix the target offset. This can be done by simply moving the ID from the inner answer block up to the outer wrapper block of the accordion item so the calculation perfectly aligns the top of the whole card below the header and I actually have this exact fix ready and am happy to open a PR if this sounds good to the team.

Steps To Reproduce

1.Navigate to /overview/faq
2.Scroll down slightly to a question like "What is JSON Schema?"
3.Click the question text to expand it
4.Watch the page force a scroll that overshoots and hides the top edge of the container behind the top navbar

Expected Behavior

The accordion should expand and scroll just enough to keep the content visible without hiding the question you just clicked. I originally thought about just removing the scroll entirely but after testing it out I realized the scrolling is actually super helpful for items near the bottom of the screen so the answer doesn't expand out of view so we definitely want to keep the feature. We really just need to fix the target offset which can be done by simply moving the ID from the inner answer block up to the outer wrapper block of the accordion item so the calculation perfectly aligns the top of the whole card below the header and I actually have this exact fix ready and am happy to open a PR if this approach sounds good to the team.

Screenshots

BEFORE CHANGES :
Image

AFTER CHANGES :
Image

Device Information [optional]
- OS: macOS
- Browser: chrome
- version: 152.0.7977.64
Are you working on this issue?

Yes

Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)

No

Dominant language
HTML
Stars
169
Forks
484
Avg merge
2d 2h
Merged PRs (30d)
6

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.

More from json-schema-org/website

All issues in json-schema-org/website

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.