Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

WAVE tool flags “Skip to content”

  • Hi,

    I’m unable to change the “Skip to content” duplication with the title and matching test. This flags an error with the WAVE testing tool with “Redundant title text”.

    The reason is the “Skip to content” text matches the title. I don’t have a way of editing that. I tried a method from 2019 that was listed for the functions file but didn’t see any change (even after caching everything). It does look like “Skip to content” is also listed twice when looking at the styles turned off.

    Is there a way so this will pass the WAVE tool test?

    Thanks,
    Nancy

  • Hi Nancy,

    For reference, can you share the link to the page in question? We’ll assess what needs to be done.

  • Can you try adding this Snippet?:

    add_filter('after_setup_theme', function(){
    
    remove_action( 'generate_before_header', 'generate_do_skip_to_content_link', 2 );
    
    add_action( 'generate_before_header', function() {
        printf( '<a class="screen-reader-text skip-link" href="#content">%s</a>',
            esc_html__( 'Jump to content', 'generatepress' )
        );
    }, 2 );
    });

    Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets

    This code changes Skip to link to Jump to link.

    Let us know how it goes.

  • Yes, that worked! Now it will pass the WAVE test for accessibility on duplicate titles.

    Would this be possible for this to be bumped up to the theme developers? WAVE is a very popular tool for basic accessibility testing. I’m going to add this snippet to my other websites I’m responsible for so my client’s aren’t vulnerable.

    Many thanks,
    Nancy

  • Hi there,

    i have marked this topic for an internal discussion.
    And we’ll add it to our A11Y review.

  • Thanks for your help!

  • You’re welcome, Nancy!

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