cds-snc / resources-ressources

Learning Resources / Ressources d'apprentissage
MIT License
3 stars 1 forks source link

[Jump-to] Anchor links don't show header title when jumping to it on mobile or narrow desktop screens #295

Closed anikbrazeau closed 1 year ago

anikbrazeau commented 1 year ago

Describe the bug

When you click on an anchor link that is expected to jump you to a specific section on the page, it does not show the header.

To Reproduce

Steps to reproduce the behavior:

  1. Go to any resource page
  2. Click on the second item in the list of headings
  3. See error, you have to scroll up to see the heading you clicked

Expected behavior

User expects to land on the section heading -- not mid-section.

Screenshots

Clicking Alpha in "On this page" component image

Land me in the middle of the section without visibility of the H2

image

Screenshot 2022-10-27 at 8 18 06 AM

Smartphone:

Desktop:

Additional context Found this bug while validating bug #120 Wonder if it's also relevant on desktop?

anikbrazeau commented 1 year ago

Resolved