tech-docs-template icon indicating copy to clipboard operation
tech-docs-template copied to clipboard

Navigation menu highlight disappears when scrolling to the next heading

Open NathanD-GDS opened this issue 2 years ago • 1 comments

What should change

At the moment, the left-hand navigation menu displays a page's H2 headings. It highlights the heading you are currently looking at. For example, this H2 in the Pay documentation.

However, when you scroll to a non-H2 heading, the highlight in the navigation menu disappears. The highlight only reappears when you reach the next H2.

Expected behaviour should be that the highlight remains even if you have hit another heading lower in the heading hierarchy, as they were 'contained' within the previous heading.

User need

This issue came up with a couple of developers during research for GOV.UK Pay's recurring payments work.

NathanD-GDS avatar Jun 21 '23 10:06 NathanD-GDS

We are looking at investigating this within GOV.UK Pay' stroopwafel team.

NathanD-GDS avatar Jun 21 '23 11:06 NathanD-GDS