Items after the fourth item in the table of contents on the published website won't be highlighted in purple after selecting, even though the page navigates to the correct spot

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

Items after the fourth item in the table of contents on the published website should be highlighted in purple after selecting.

Actual result

Items after the fourth item in the table of contents on the published website won’t be highlighted in purple after selecting, even though the page navigates to the correct spot

I can’t reproduce. Bear in mind that the item at the top of the page is what is in purple.

Hey, thanks for looking into this! Are you saying only the top items are highlighted in purple when selected? Here’s a screen recording from my site. When I click the third item, it directs me to the correct spot on the page, but it doesn’t get highlighted.

Screen Recording 2024-09-12 at 4.37.56 PM

Even if you don’t click on anything and just scroll the page, different elements on the TOC become purple depending on what is currently on top of the main page.

Thanks for the quick response!

I think the issue here is that this is a navigation bar. When a user clicks on an item, it takes them to the corresponding spot, but it feels off when the highlight effect only applies to the top items.

Plus, the way “top” is defined isn’t user-friendly or intuitive—why would the item at the top of the page link to a navigation instead of highlighting the section where the user actually clicked?

This is part of the UI responding to the user’s action for a navigation bar, and the inconsistency doesn’t align with what the user would expect.

Because it acts as a navigation map.
You can scroll the document look at the navigation, the purple item correspond to what is currently at top of the page.
The last item sometimes don’t get purple because it can’t be scrolled to be at the top of the page.

I see what you mean! But I think the issue I mentioned is also something that bothers/confuses users, so maybe we can think of ways to improve that as well.