• Resolved makinero

    (@makinero)


    Hello,

    When I run my website through the W3C HTML validator, I encounter numerous errors like this one:

    “A link element with an as attribute must have a rel attribute that contains the value preload or the value modulepreload.”

    One of the affected files is:

    /wp-content/plugins/woocommerce/assets/client/blocks/cart-frontend.js

    This file currently uses “prefetch” as the rel attribute value.

    Could you please update this to comply with the validator’s requirements?

    Thank you for your assistance.

    • This topic was modified 1 year, 10 months ago by makinero.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @makinero,

    Thanks for reaching out.

    /wp-content/plugins/woocommerce/assets/client/blocks/cart-frontend.js

    I understand your effort to ensure your website meets W3C HTML validation standards.

    Looking at the shared path, this is a core WooCommerce file and any changes made to it will definitely get replaced in the next update. While we do consider W3C validation, there are instances where modern practices or compatibility requirements may lead to warnings or errors in validators.

    Have you tried other HTML validation tools and see if they all lead to the same errors as the one you’ve described? Also, do these errors cause any functional issues?

    Thread Starter makinero

    (@makinero)

    Hello,

    “Looking at the shared path, this is a core WooCommerce file and any changes made to it will definitely get replaced in the next update.”

    Do you mean all JS files will have a proper rel attribute?

    I didn’t try any other HTML validator since the W3C one is the most accurate.

    Zee

    (@doublezed2)

    Hello makinero,

    Thank you for your reply.

    I want to circle back to this error:
    “A link element with an as attribute must have a rel attribute that contains the value preload or the value modulepreload.”

    I checked my test with the HTML validator tool and I could not find the error.
    Here are the results of my test site.

    Could you share the results of your site?
    This would help me compare both results.

    Looking forward to your response. 🙂

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘HTML validation errors’ is closed to new replies.