alphagov / alphagov/tech-docs-template
Navigation menu highlight disappears when scrolling to the next heading
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 84
- Forks
- 36
- Avg merge
- 10h 56m
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the disappearing highlight in the left-hand navigation using the linked Pay documentation, then trace the template's navigation highlighting entry point and its handling of H2 and lower-level headings. Done means the previous H2 remains highlighted while scrolling through headings contained within it, until the next H2 is reached.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- documentation, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100