- This topic has 9 replies, 3 voices, and was last updated 3 years, 3 months ago by
Fernando.
-
AuthorPosts
-
April 19, 2022 at 4:50 pm #2194096
Anil
<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
April 19, 2022 at 7:57 pm #2194186Anil
Is there any function I can use to correct this…
April 19, 2022 at 8:11 pm #2194189Fernando Customer Support
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. 🙂
April 19, 2022 at 8:25 pm #2194195Anil
I want to apply it for home, archive, and search result…. this bug is there….
April 19, 2022 at 11:21 pm #2194281Fernando Customer Support
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! 🙂
April 20, 2022 at 9:12 pm #2195461Anil
Thanks, would you resolve this issue in next updates….
April 21, 2022 at 12:34 am #2195591Fernando Customer Support
You’re welcome Anil! Will reach out to the team regarding this. 🙂
April 21, 2022 at 12:37 am #2195592Anil
Thanks, I mentioned the solution also… bye.
January 23, 2023 at 8:38 pm #2506646acela
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 rolesEach ARIA
rolesupports a specific subset ofaria-*attributes. Mismatching these invalidates thearia-*attributes. Learn more.
https://web.dev/aria-allowed-attr/?utm_source=lighthouse&utm_medium=lrFailing 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.
January 23, 2023 at 8:50 pm #2506648Fernando Customer Support
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.
-
AuthorPosts
- You must be logged in to reply to this topic.