-
Notifications
You must be signed in to change notification settings - Fork 175
Open
Description
What
On pages that include a sidebar table-of-contents / in-page navigation (list of headings), it would be helpful to visually highlight the currently active section as the reader scrolls.
Why
On long pages it’s difficult to tell where you are in the document. A clear active state improves navigation and readability.
Expected behavior
- As the user scrolls, the sidebar item corresponding to the heading currently in view becomes bold (or otherwise clearly “active”).
- The active state updates as the user enters the next/previous section.
- Clicking a TOC item should also set the correct active state.
Actual behavior
- Sidebar items don’t clearly indicate the current section while scrolling in the Table of Contents located in the sidebar.
Suggested implementation
Add scrollspy behavior (IntersectionObserver) to toggle an active class based on headings in view.
Metadata
Metadata
Assignees
Labels
No labels