Why doesn't the nav link highlight change when I scroll?
ScrollSpy requires the scroll container to have position: relative or be the window. Also, the container must have the data-bs-spy="scroll" attribute and the correct data-bs-target. Without these, ScrollSpy won't detect scrolling properly (see render_step 2).
💡 Make sure the scroll container is set up with data-bs-spy and position relative.
Why is the active nav link highlight delayed or off by some pixels?
The data-bs-offset attribute controls when a section is considered active. If offset is too large or small, the highlight changes too early or late (see property_table). Adjusting offset fixes this timing.
💡 Use data-bs-offset to fine-tune when nav links highlight during scroll.
Why can't I scroll the content with keyboard?
The scroll container needs tabindex="0" to be focusable for keyboard scrolling (see code_sample). Without it, keyboard users can't scroll and trigger ScrollSpy updates.
💡 Add tabindex="0" to scroll container for keyboard accessibility.