Site logo

Archived topic

A bug --

9 replies · Started by Anil on April 19, 2022

Viewing posts 1–10 of 10

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

This is an empty block created and causing space below entry-summary... due to its own css

When there is no content to populate for this <footer class="entry-meta" aria-label="Entry meta"></footer> it should not be there....

this should be written if there is any option to display then add this <footer class="entry-meta" aria-label="Entry meta"> content of options and similarly close if there is any option to display then add this </footer>

I believe you will update this.

Regards

Also in lighthouse throwing error: [aria-*] attributes do not match their roles

Is there any function I can use to correct this...

Hi Anil,

You can try adding this PHP snippet to remove the footer meta:

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

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

Adding it through Code Snippets should work.

Kindly let us know how it goes. :)

I want to apply it for home, archive, and search result.... this bug is there....

If that’s the case, you can try this instead:

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

Hope this helps! :)

Thanks, would you resolve this issue in next updates....

You’re welcome Anil! Will reach out to the team regarding this. :)

Thanks, I mentioned the solution also... bye.

Hi, just wanted to follow up on this.

I ran into the same issue that Anil described above. PageSpeed Insights was throwing the following warning for my home and archive pages:

ARIA
[aria-*] attributes do not match their roles

Each ARIA role supports a specific subset of aria-* attributes. Mismatching these invalidates the aria-* attributes. Learn more.
https://web.dev/aria-allowed-attr/?utm_source=lighthouse&utm_medium=lr

Failing Elements

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">
...

I wasn't quite sure why this was happening, but a search turned up this thread. And fortunately the solution suggested by Fernando above took care of the issue and removed the empty footer blocks. Then I had to readjust my Content Padding under Customizing ▸ Layout ▸ Container.

So this took an while to figure out what was going on and to fix, and I was just wondering if it's an issue with GeneratePress that should be addressed? Thanks.

Hi Acela,

It's not a bug. It's normal if you remove all footer entry-meta content. The snippet fixes that though. It removes the now empty div for the footer entry-meta.

This archived topic is closed to new replies.