Site logo

[Resolved] Some code still needed to make it run 100%

Home Forums Support [Resolved] Some code still needed to make it run 100%

Home Forums Support Some code still needed to make it run 100%

  • This topic has 4 replies, 2 voices, and was last updated 4 years ago by Maarten.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2132198
    Maarten

    Dear support,

    I have tested so many theme’s for WordPress in my life, that I still conclude that GeneratePress is the best there is when it comes to speed and having real error free tested HTML 5 code.

    In all my tests I have gotten it to 100% in Lighthouse test using Chrome browser.

    I still like to share some code I needed to use to make it 100% error free and maybe ask to put this code into the free theme.

    When running a lighthouse test the following can be seen:

    [aria-*] attributes do not match their roles
    Each ARIA <code>role</code> supports a specific subset of <code>aria-*</code> attributes. Mismatching these invalidates the <code>aria-*</code> attributes. Learn more.
    Failing Elements
    footer.entry-meta-boxes

    Most of the time this will be seen under Accessibility or Best practices. The score will be like 94% and not 100%

    This happens because there is some meta missing, or not loaded in footer section.

    Solution:
    https://generatepress.com/forums/topic/im-not-able-to-remove-the-footer-meta/#post-1923168

    That was a great explanation, but this is still not in the free theme.

    The code:

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

    Then, next is the notice about missing headings when users place comments below an article.

    Test:
    Have an article and open comments, place some comments and run the test on https://validator.w3.org/

    HTML Validate:
    Warning: Article lacks heading. Consider using h2-h6 elements to add identifying headings to all articles.
    <article class=”comment-body” id=”div-comment-1″ itemtype=”https://schema.org/Comment&#8221; itemscope>

    I still do not know why W3 is looking for headings in comments as this does not
    make any sense to me, but I still like to report this issue here.

    These 2 things above are really the only 2 things to make it all 100% perfect.

    GeneratePress is perfect because:

    https://validator.w3.org/
    Besides the headings in comments, all HTML is error-free!

    https://jigsaw.w3.org/css-validator/#validate_by_input
    ALL CSS is error-free!

    https://validator.schema.org
    ALL schema is error-free!

    Without any extra plugins and just the theme, it is possible to get Lighthouse 100% for all test-phases.
    100% on Desktop and 100% on Mobile.

    Now, try this with a competitor theme.
    Just take any theme and put the code inside https://validator.w3.org/#validate_by_input

    You will see errors, test the following site https://www.kadencewp.com/

    You see what I mean?

    THAT is the reason GeneratePress is till in 2022 the best theme ever created and this can now be even tested like I did above.

    Maybe have a better option in GP Premium to configure the Scroll to Top for only appearing at the end of the page and not covering text, but besides that this is the best theme every made.

    I hope the 2 points above can at least be looked at to make it 100% perfect.

    1) `[aria-*] attributes do not match their roles needed the code to make it 100% error-free (Advice to put it in the free theme)
    2) Article lacks heading. Consider using h2-h6 elements to add identifying headings to all articles. W3 HTML test (No idea how to fix this)

    Best regards.

    #2132681
    Tom
    Lead Developer
    Lead Developer

    Hey Maarten,

    Thanks for the feedback here! Always appreciated.

    Is there any chance you can create a new issue for these items (can put both into one issue) over here?: https://github.com/tomusborne/generatepress

    That way we can tag it for 3.2.0 and get these items fixed.

    #1 is hopefully an easy fix. #2 is a bit harder as it means we need to replace the article HTML tag with div, which may break custom CSS for some users.

    Thanks again!

    #2134046
    Maarten

    You are welcome Tom, good to know my information was helpful.
    I do not have an account on Github but of course I can make one.
    If it is better to have the information there I will put it there, I just need to know what to put there.
    Same info as here or just the technical part?

    Also Tom, there is a error in the Dutch translation of the Prev en next buttons, links.
    No idea if this is also happening in the US version, but when a user clicks the next page in the blogroll, the Prev. link starts with no capital letter. So you will see Next -> en then the Previous will be in previous (no capital letter) and Next will have the capital letter. No idea if this is also the case for the US version, but for the Dutch version it does have this issue.

    I used the following code to fix it and also remove the numbers:

    if ( get_option( 'generate_child_show_custom_prev_next' ) == '1' ) {
       add_filter( 'generate_next_link_text', function() {
       return 'Verder &rarr;';
    } );
       add_filter( 'generate_previous_link_text', function() {
       return '&larr; Terug';
    } );
    }

    Have a great weekend!

    #2135022
    Tom
    Lead Developer
    Lead Developer

    GitHub is always best for bug reports as we go through all of them for each release. Reports can get lost here in the support forum.

    As for the translation, can you suggest the correction here?: https://translate.wordpress.org/locale/nl/default/wp-themes/generatepress/

    Thank you! 🙂

    #2150061
    Maarten

    Thanks Tom, will do that as soon as I am back home!

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