Site logo

Archived topic

Aria attributes do not match their roles

7 replies · Started by Kelsey on March 2, 2023

Viewing posts 1–8 of 8

Hello, I am getting this accessibility message on PageSpeed Insights for my category pages.

Aria attributes do not match their roles
Entry meta
<footer class="entry-meta" aria-label="Entry meta">

How can I fix it? And why is it only happening on my category pages?

It won't let me add it (an exclamation point shows up next to the fourth line).

I have also never used Code Snippets before, what do I set the location to? Thanks!

I tried it again but this is the message I keep getting:

rule 934100 - reason Node.js Injection Attack Matched Data: function() { found within args:snippet_code: add_action('wp',function() {\r\n\tif (is_archive()) {\r\n\t\tremove_action( 'generate_after_entry_content', 'generate_footer_meta' );\r\n\t }\r\n});

Hi there,

that looks a security plugin or setting on your server that is blocking that function.

For now don't use that snippet.

Go to Customizer > Additional CSS and add this CSS:

.archive .entry-meta {
    display: none;
}

Thank you, it worked!

Glad to hear that!

This archived topic is closed to new replies.