Site logo

[Resolved] Skip To COntent

Home Forums Support [Resolved] Skip To COntent

Home Forums Support Skip To COntent

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #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.

    #1687517
    Elvin
    Staff
    Customer Support

    Hi 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. 🙂

    #1687529
    Praveen

    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!

    #1687535
    Elvin
    Staff
    Customer Support

    I 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 );
    #1687560
    Praveen

    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?

    #1687643
    Elvin
    Staff
    Customer Support

    Can 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.

    #1687647
    Praveen

    Thanks! got it.

    #1687648
    Praveen

    How can I add images / attachments ? I was checking pagespeed and same error came at many places

    #1687690
    Elvin
    Staff
    Customer Support

    How 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.

    #1687705
    Praveen

    Here it is.

    Can this be because of Asset Clean Up plugin?

    #1687867
    David
    Staff
    Customer Support

    Hi there,

    try disabling that plugin, and clear any caches – you can then eliminate that as the cause.

    #1688863
    nomadiceman

    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

    #1688880
    Leo
    Staff
    Customer Support

    Not sure if I fully understand.

    Can you explain a bit more?

    There isn’t anything special about the Search template.

    #1690469
    nomadiceman

    Sorry Leo, ignore me, I’m being stupid haha. Feel free to delete my comment

    #1690470
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.