Archived topic
Accessibility Issue
5 replies · Started by Scott on December 28, 2022
I’m getting this from pageSpeed Insights. It a fairly substantial hit to the score.
[aria-*] attributes do not match their roles
Each ARIA
rolesupports a specific subset ofaria-*attributes. Mismatching these invalidates thearia-*attributes.Failing Elements
Entry meta
<footer class="entry-meta" aria-label="Entry meta">
I can’t figure this out except to say it’s only on blog posts.
Hi Scott,
Can you try adding this PHP Snippet?:
add_action( 'wp', function() {
remove_action( 'generate_after_entry_content', 'generate_footer_meta' );
} );
Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets
That appears to have fixed it. But what was/is the issue if I might ask?
Are you showing the categories and tags in single posts in Appearance > Customize > Layout > Blog? If some posts don't have either a category or tag and you have this enabled, that issue occurs.
I have show category and tag unchecked in the customizer under layout>blog>single
So that’s good to know!
thank you
You're welcome, Scott!
