Elements with visible text labels do not have matching accessible names.

[ad_1]

Hi @marius84,

How are you changing the Read more label specifically?

I did not understand what are you saying. I posted how to solve the issue and you are reply with another question.

@diggeddy any idea to solve this?

That issue indicates that there is an inconsistency between the visible text label of an element its accessible name.

Looking at your Read More text, the aria-label starts with More on whereas the text starts with read more.

By default you’d need a code to alter that, adding the Post title as well. The reason I asked how you’re altering the read more link is so we can assess your code if indeed you have one.

If you’re using a plugin for this however, you’ll need to contact the developer of that plugin.

@fernandoazarcon2 I’m not using any plugin for this. I just use a fresh Generate press theme. An this Read More text it’s automatically generated by the Generate press theme.

Hi there,

what Fernando is saying is correct.
I assume the code you were given in this old topic is still present on the site:

For reference this is the code that Tom provided to change the Read More label:

add_filter( 'generate_excerpt_more_output', function() {
    return sprintf(
        ' ... <a title="%1$s" class="read-more" href="https://projectdmc.org/support/topic/elements-with-visible-text-labels-do-not-have-matching-accessible-names/%2$s" aria-label="%4$s">%3$s about %5$s</a>',
        the_title_attribute( 'echo=0' ),
        esc_url( get_permalink( get_the_ID() ) ),
        __( 'Read more', 'generatepress' ),
        sprintf(
            /* translators: Aria-label describing the read more button */
            _x( 'More on %s', 'more on post title', 'generatepress' ),
            the_title_attribute( 'echo=0' )
        ),
        get_the_title()
    );
} );

And it is this 'More on %s' that returns the More on post title. Try changing it to: 'Read more about %s'

@diggeddy As always you are a top notch expert! Changing More on %s with Read more about %s solved the issue!

Thank you so much!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer