Broken Anchor Links #content
Tagged: broken anchor links
November 22, 2016 at 8:55 pm #40148November 26, 2016 at 3:19 am #40224BidurModerator
We can’t under what you are trying to say. Please clarify more. And we haven’t put any anchors in template it is added while adding content so also please can you check on that while you have added anchor links in content.
ThanksNovember 26, 2016 at 6:04 pm #40237
No anchor links have been added by me. I’m wondering if it may be related to the “skip to content” screen reader links. Are the screen reader links defined but not identified in the page template?
The #content anchor link is supposed to link to http://greenleaf.biz/customers/#content
But that doesn’t exist on the page.November 28, 2016 at 5:47 am #40249
We have visited this link[ http://greenleaf.biz/customers/ ] but couldn’t find any links that end with #. Could you tell us how we can produce that broken link error so we can track the issue and can provide you appropriate solution.
We look forward for your response.
ThanksNovember 28, 2016 at 6:17 pm #40288
The link is embedded in the page. You will have to look at the code to see that is is there. Just below the header you will see this link on line 298. //< a href=”#content” title=”Skip to content”>Skip to content
Here is the code within that bit of context:
<div id=”secondary-nav” style=”background-color: #000000;”>
<div id=”navbar” class=”navbar”>
<nav id=”site-navigation2″ class=”navigation main-navigation” role=”navigation”>
<div class=”menu-toggle-wrapper hidden-md hidden-lg”>
// < a href=”#content” title=”Skip to content”>
Skip to content</ a>
<ul id=”menu-greenleaf-main-menu” class=”nav-menu”>
Do you know where this is coming from?November 29, 2016 at 5:04 am #40325
Skip to content is especially made for accessibility read , it is used by visually impaired person.
You can find the skip to content on header.php template. Please use child theme header.php template to remove the skip to content link, Otherwise your custom changes will be lost on theme update.
Let us know if you have any doubt on this.
ThanksApril 19, 2017 at 11:16 pm #44520
I’m sorry, but I need to ask this again. I did (as suggested above) comment out the skip to content code as a temporary fix to avoid having broken anchor links show up on all pages of the site. But I would like a better solution.
I do see where the reference is in the header.php file to skip to the main content for screen readers. What DOESN’T work though is the destination of that anchor link (i.e., where the accessibility reader is supposed to skip TO) is not found in the template either on the header.php file or the page.php (or whatever other template from the theme the page is using).
I see this occurring on both the Circumference and the Preferential themes, I’m not sure if it is in any of the others.
Here is the code from the Preference header.php file:
I believe the problem is not in the above code, but either at the end of the header.php template or in another page template that contains the page content. I haven’t been able to find that yet. Either that or the name #content is not correct and simply needs to be named correctly to find the content.
I hope this makes more sense.April 20, 2017 at 5:09 am #44542
You can bookmark the content on skip the content. You can follow the example described here.
For bookmarking the link you can place content id on to href. For more details please take reference of this article
Let us know if you find any problems with this.
Note: Please use child theme to customize header.php so your changes will not lost on theme update. And also please proceed only if you are technically sound on WordPress.
ThanksApril 20, 2017 at 3:48 pm #44569
Thanks for getting back to me. So are you saying there isn’t a bookmark link in the theme’s page templates at all?
I’m surprised you didn’t add one to the theme page templates. Why add the skip link to the header if you aren’t going to add the bookmark? Seems average users wouldn’t know to add it. This makes the theme unfriendly to screen readers and also gets picked up as a broken link in SEO tools. A broken link on every page does not help a site’s SEO.
I see the link is looking for div ID “content” which I’m not seeing in the header or page templates. Seems like this should this be changed to an ID that exists in the theme somewhere.
April 21, 2017 at 5:04 am #44572
- This reply was modified 4 years ago by Ellen.
We will update our themes fixing this issue, soon…
And sorry for the inconvenience caused.
ThanksMay 4, 2017 at 6:45 pm #45345
Hello, just checking to see if this has been fixed yet.May 5, 2017 at 4:09 am #45359
We will let you know about the update. Please keep patience.
ThanksMay 5, 2017 at 5:54 am #45362
We have updated to version 5.0.5, please update your theme to latest version to fix skip to content issue.
Note: Please take a backup of your theme before updating, so you can take a action if disaster strikes.
ThanksMay 5, 2017 at 4:24 pm #45379
Wonderful! Thanks for all your help Sushil!May 8, 2017 at 5:43 am #45418
You are most welcome Eleen, Happy to help you
- You must be logged in to reply to this topic.