-
NancySeeger
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 -
Fernando
Hi Nancy,
For reference, can you share the link to the page in question? We’ll assess what needs to be done.
-
-
Fernando
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 linktoJump to link.Let us know how it goes.
-
NancySeeger
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. -
NancySeeger
Thanks for your help!
-
Fernando
You’re welcome, Nancy!
- You must be logged in to reply to this topic.