Site logo

[Resolved] A bug —

Home Forums Support [Resolved] A bug —

Home Forums Support A bug —

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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

    #2194186
    Anil

    Is there any function I can use to correct this…

    #2194189
    Fernando
    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. 🙂

    #2194195
    Anil

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

    #2194281
    Fernando
    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! 🙂

    #2195461
    Anil

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

    #2195591
    Fernando
    Customer Support

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

    #2195592
    Anil

    Thanks, I mentioned the solution also… bye.

    #2506646
    acela

    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.

    #2506648
    Fernando
    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.

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