- This topic has 14 replies, 5 voices, and was last updated 5 years, 3 months ago by
Leo.
-
AuthorPosts
-
March 8, 2021 at 8:54 pm #1687507
Praveen
Hi guys,
On some pages and sometimes I see “Skip to content” written at top left of mobile. When I refresh it goes.
Today I saw it in the URL attached, but after refreshing its gone.
I am not sure what is causing it.
March 8, 2021 at 9:08 pm #1687517Elvin
StaffCustomer SupportHi there,
It’s the screen-reader-text skip-link. It’s for keyboard navigation.
https://make.wordpress.org/accessibility/handbook/markup/the-css-class-screen-reader-text/It appears when you press tab. 🙂
March 8, 2021 at 9:33 pm #1687529Praveen
Hi,
two things –
1. It appeared on mobile – where I cannot press Tab
2. Appeared on Google console Live testing of the same URL – where again, I cannot press a tab!March 8, 2021 at 9:56 pm #1687535Elvin
StaffCustomer SupportI checked it on mobile as well and I didn’t encounter this at all.
The same goes with Google PSI and Lighthouse.
I’ve also checked the CSS and I believe it’s CSS being cached and loading a bit later than it should’ve might’ve something to do on why it appeared briefly.
It’s not good practice but if you must remove this, here’s the PHP snippet to do it:
add_action( 'after_setup_theme', function() { remove_action( 'generate_before_header', 'generate_do_skip_to_content_link', 2 ); }, 50 );March 8, 2021 at 10:36 pm #1687560Praveen
Hi,
Appreciate your help.
I will take a snapshot of this when it happens next time.
Can it be a cache-related issue?
Will removing this have any SEO-related issue?
March 9, 2021 at 12:36 am #1687643Elvin
StaffCustomer SupportCan it be a cache-related issue?
It can be, as it’s related to how the CSS related to the screen-reader-text skip-link is being served.
Will removing this have any SEO-related issue?
I’m not exactly sure but It’s not good practice to remove it as it’s added for accessibility.
March 9, 2021 at 12:45 am #1687647Praveen
Thanks! got it.
March 9, 2021 at 12:49 am #1687648Praveen
How can I add images / attachments ? I was checking pagespeed and same error came at many places
March 9, 2021 at 1:25 am #1687690Elvin
StaffCustomer SupportHow can I add images / attachments ? I was checking pagespeed and same error came at many places
To add to reply? If you need to upload screenshots for explanations, you can use a cloud service like Postimages or Imgur.
March 9, 2021 at 1:37 am #1687705Praveen
Here it is.
Can this be because of Asset Clean Up plugin?
March 9, 2021 at 4:14 am #1687867David
StaffCustomer SupportHi there,
try disabling that plugin, and clear any caches – you can then eliminate that as the cause.
March 9, 2021 at 4:05 pm #1688863nomadiceman
The code is actually on your site template https://gpsites.co/search/
My SEO plugin is picking it up a broken link to “#content” that’s how I spotted the same thing
March 9, 2021 at 4:55 pm #1688880Leo
StaffCustomer SupportNot sure if I fully understand.
Can you explain a bit more?
There isn’t anything special about the Search template.
March 10, 2021 at 6:35 pm #1690469nomadiceman
Sorry Leo, ignore me, I’m being stupid haha. Feel free to delete my comment
March 10, 2021 at 6:39 pm #1690470Leo
StaffCustomer SupportNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.