Site logo

[Support request] Aria attributes do not match their roles

Home Forums Support [Support request] Aria attributes do not match their roles

Home Forums Support Aria attributes do not match their roles

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2553408
    Kelsey

    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?

    #2553511
    Ying
    Staff
    Customer Support

    Hi Kelsey,

    Can you try this PHP code:

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

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #2553516
    Kelsey

    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!

    #2553523
    Leo
    Staff
    Customer Support

    Ying function shows no error for me:
    https://www.screencast.com/t/nulh2ZrQN

    Can you make sure to copy and entire thing?

    #2554301
    Kelsey

    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});

    #2554401
    David
    Staff
    Customer Support

    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;
    }
    #2554587
    Kelsey

    Thank you, it worked!

    #2555162
    David
    Staff
    Customer Support

    Glad to hear that!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.