WordPress.org

Making WordPress.org

Opened 2 months ago

Last modified 6 weeks ago

#5867 new defect

Anchor links headline invisible behind top menu bar. Should have compensating offset.

Reported by: abitofmind Owned by:
Milestone: Priority: lowest
Component: WordPress.org Site Keywords:
Cc:

Description

Otherwise when jumplink to the target of an anchor link by TOC or direct deep link the arriving user does not see the heading and may be disoriented or not get the context at first.

There are even ready made WordPress plugins to do this like i.e.:
https://wordpress.org/plugins/page-scroll-to-id/
and I assume also some themes have such offset-compensation-mechanisms built in.

See screenshots of the problem and the proposed solution:
https://www.dropbox.com/s/0wysnpu87ponqfa/
https://www.dropbox.com/s/wjiy9ku1yctyc0y/
https://www.dropbox.com/s/n5cmp39ll6da5vn/
https://www.dropbox.com/s/57jqquvdvuvxg9x/

Attachments (4)

WordPressOrg anchor link invisible 1.png (156.8 KB) - added by abitofmind 2 months ago.
WordPressOrg anchor link invisible 2.png (163.5 KB) - added by abitofmind 2 months ago.
WordPressOrg anchor link invisible 3.png (145.4 KB) - added by abitofmind 2 months ago.
WordPressOrg anchor link invisible 4.png (146.7 KB) - added by abitofmind 2 months ago.

Download all attachments as: .zip

Change History (11)

#1 @jonoaldersonwp
2 months ago

  • Priority changed from normal to lowest

This can be solved with some simple CSS; see scroll-margin-top

#2 @abitofmind
2 months ago

Didn't know about this CSS attribute! Great.

Followup:

  • I'm merely the reporter, not an active part of a WP team.
  • Are there plans to improve this? In the default theme? Or in the WordPress.org instance?

#3 @jonoaldersonwp
2 months ago

All open tickets get reviewed and triaged, though resource is short, and this is likely to be of low priority. Should be an easy fix, though, so hopefully, it'll land on wordpress.org without taking years...

#4 @abitofmind
2 months ago

Thanks for informing us here about the team workflow.
It's a quick win — quite a usability gain achievable with not too much effort — so that again should prioritize it higher, I hope.

Anyway sharing CSS scroll-margin-top is a good hint for individual CSS workarounds for many blogs/themes out there who may arrive here via a search engine. Thanks!

This ticket was mentioned in Slack in #forums by abitofmind. View the logs.


8 weeks ago

#6 @abitofmind
7 weeks ago

The deficiency outlined in this very issue also manifests itself in this/these issue(s):

  • #5877 (among other issues)

#7 @abitofmind
6 weeks ago

Found plugin Fixed Menu Anchor which deals with the symptom. It was last updated circa 2016.

As CSS attribute scroll-margin-top got major browser support only ca. 2018-2020, I assume that plugin involves some Javascript. A pure native CSS surely works smoother. But maybe a workaround for some in the meantime.

Note: See TracTickets for help on using tickets.