[Resolved] W3C Validation

Home Forums Support [Resolved] W3C Validation

Home Forums Support W3C Validation

  • This topic has 8 replies, 3 voices, and was last updated 4 years ago by Tom.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1231074
    Michael

    Hi guys,

    I’m working through W3C validation tests for the site, and am getting some errors on blog pages that I don’t appear to have control over eg https://validator.w3.org/nu/?doc=https%3A%2F%2Freclaimdesign.org%2Fcommissioned-work%3Fao_noptimize%3D1

    The results mention autocomplete=”nope” as being an error for the text area. Shouldn’t that be “off”? And there were several errors relating to ItemProp – that’s microdata markup isn’t it? If it is, I don’t understand how it’s in there because I turned off schema with add_filter( 'generate_schema_type', '__return_false' ); Also x-dns-prefetch-control errors apparently.

    Please could you help me resolve these?

    Michael.

    #1231546
    David
    Staff
    Customer Support

    Hi there,

    that autocomplete attribute is not coming from GP’s Comment text field. Something else maybe a Spam Protection or SEO plugin has inserted a hidden Text Field.

    Schema – do you have any custom functions that may be including the some itemProps attributes ?

    #1231663
    Michael

    Hi David, I’ve been researching this afternoon, and it looks like autocomplete=”nope” might have something to do with AntiSpam Bee plugin, so I’ve written to them to ask for more info.

    Thank you for your suggestion about the custom snippets. To be honest I couldn’t see anything amiss when I looked over them, but as you suggested this as a possible cause I disabled all of them and started to add back in one by one, and lo and behold you are right! It’s this one that is the culprit from RankMath:

    /* Version2 
     *
     * Filter to add plugins to the TOC list.
     *
     * @param array TOC plugins.
     */
    add_filter( 'rank_math/researches/toc_plugins', function( $toc_plugins ) {
           $toc_plugins['seo-by-rank-math/rank-math.php'] = 'Plugin Name';
        return $toc_plugins;
    });

    I will write to them now. Thank you very much for pointing me in the right direction!

    #1231682
    Michael

    Hi David,

    I got it wrong, it looks like it is actually a GP code snippet to turn off schema which is causing the itemprop error:

    add_filter( 'generate_schema_type', '__return_false' );

    I initially thought it was RankMath’s snippet, but that was due to the cache not clearing instantly (so I ran the test too quickly again, and the RankMath snippet was next in line from the GP one, is what I mean!)

    I have double checked, and with the GP snippet disabled, the itemprop errors are no longer flagged.

    Please could you help me fix it?

    Thank you πŸ™‚

    Michael.

    #1231982
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    What are the specific itemprop errors you’re getting?

    #1232283
    Michael

    Hello Tom,

    Thanks for getting back to me. I’ve turned the GP Schema Off code snippet back on, and re-run the validation for:

    https://validator.w3.org/nu/?doc=https%3A%2F%2Freclaimdesign.org%2Fcommissioned-work%3Fao_noptimize%3D1

    And these are the itemprop errors I get:

    https://www.dropbox.com/s/xrj2tzcabns2uiu/itemprop-validation-errors.jpg?dl=0

    If I disable the GP Schema Off snippet, the errors go away.

    The above is just an example page – all of the pages look like they get the itemprop errors (as was highlighted to me in Website Auditor). If you want to run a test on any of the other pages on my site, you can append ?ao_noptimize=1 to the url – this will bypass the minification stuff and make the line numbers tally up so it’s easier to see what is happening where.

    Thank you for your help!

    Michael.

    #1232898
    Tom
    Lead Developer
    Lead Developer

    Looks like something we need to fix in the theme – I’ve made a note to get it done in 2.5.0 πŸ™‚

    #1232990
    Michael

    Thank you Tom – much appreciated πŸ™‚

    #1233344
    Tom
    Lead Developer
    Lead Developer

    Thanks for pointing it out πŸ™‚

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