Archived topic
Change redundant title in screen reader shortcut
6 replies · Started by John on April 1, 2021
Hi there,
I am seeing an error when testing the site for the screen reader "Skip-to-content"
Redundant title text<a class="screen-reader-text skip-link" href="#content" title="Skip to content">
Skip to content
</a>
<div class="t
The site is:beingwellflorida.com
I am testing it on: https://wave.webaim.org
The error I get is a redundant title text.
What can I change this to in order to fix it?
And where can I change it?
Many thansk!
John
Hi there,
Try Tom's answer here:
https://generatepress.com/forums/topic/wcag-2-0-aa-redundant-title-issue/#post-825091
Hi Elvin,
I tried that - it seems to add a second "SKIP-TO-CONTENT"
This second one works (or doesn't give errors), but the first one is there still.
Any more ideas?
Thank you!
Ah I see.
The remove_action didn't work w/o it being added in after_setup_theme.
Try modifying this:
remove_action( 'generate_before_header', 'generate_do_skip_to_content_link', 2 );
into this:
add_action( 'after_setup_theme', function(){
remove_action( 'generate_before_header', 'generate_do_skip_to_content_link', 2 );
} );
What we're doing here is we're replacing the accessibility link with another one that doesn't have the title attribute. :)
you're seeing double because the remove_action didn't work as is. :)
Ok great - that worked a treat - can I ask another question in this thread related to this site and ADA or should I open a new one?
It is a different issue, but along the same lines...
And thank you for the explanation too - good to learn as I go.
Ok great – that worked a treat – can I ask another question in this thread related to this site and ADA or should I open a new one?
It is a different issue, but along the same lines…
It's best to open a new one so this thread stays on topic. So it doesn't get too convoluted for other readers. (Some users just search things and find answers w/o asking. :) )
And thank you for the explanation too – good to learn as I go.
I'm genuinely glad you learned something. Glad to be of any help. No problem. :D