Site logo

Archived topic

aria attributes do not match their roles

7 replies · Started by Bella on February 7, 2023

Viewing posts 1–8 of 8

Does anyone know how to easily fix this? I can't seem to find a clear answer on Google

Hi Bella,

For questions like this, we would have to see the detailed error notification and the HTML elements it refers to.

Does the error notification point out which element is having the issue?

Hi Ying,

It says this 10x

Entry meta
<footer class="entry-meta" aria-label="Entry meta">
Entry meta
<footer class="entry-meta" aria-label="Entry meta">
Entry meta
<footer class="entry-meta" aria-label="Entry meta">

Hi there,

this can occur if there is no footer meta being displayed on a site.
can you share a link to the site with the issue ? I can then provide the correct fix.

Try adding this PHP Snippet to your site:

add_action( 'wp', function() {
    if ( !is_single() ) {
        remove_action( 'generate_after_entry_content', 'generate_footer_meta' );
    }
} );

Note that this removes the Footer Meta from the archive pages, so if you ever need to display that meta ( which is set in the Customizer > Layout > Blog ) eg. Category terms, then that snippet would need removing.

Thank you so much David! That worked :)

Glad to hear that!

This archived topic is closed to new replies.