[wp-trac] [WordPress Trac] #63289: Error in validator.w3 (After updating to version 6.8)

WordPress Trac noreply at wordpress.org
Tue Jun 10 19:17:14 UTC 2025


#63289: Error in validator.w3 (After updating to version 6.8)
--------------------------+----------------------
 Reporter:  mike77777     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:
 Severity:  normal        |  Resolution:  wontfix
 Keywords:                |     Focuses:
--------------------------+----------------------

Comment (by karl53):

 "As documented on MDN, speculationrules is a valid value for the type
 attribute for the Speculation Rules API."

 The error I get isn't that the 'speculationrules' itself isn't valid. This
 is what I get:

 "Bad value “speculationrules” for attribute “type” on element “script”:
 Subtype missing."

 So the problem is a missing subtype.

 I just wanted to share this with you. The W3.org local Java-based tool
 can't parse the URL on Windows, but it can on Mac.







 Replying to [comment:3 peterwilsoncc]:
 > As documented on MDN, `speculationrules` is a
 [https://developer.mozilla.org/en-
 US/docs/Web/HTML/Reference/Elements/script/type/speculationrules valid
 value for the type attribute] for the Speculation Rules API. You can read
 more about WordPress's use of [https://make.wordpress.org/core/2025/03/06
 /speculative-loading-in-6-8/ speculative loading in the dev-note].
 >
 > While the W3C's validator is a helpful tool, it can be a little behind
 browser implementations as features gain support during the late stages of
 the standardization process. WordPress focuses on what will be useful for
 users and will often implement such features as they arrive in browsers.
 This is one such case.
 >
 > If you wish to remove the speculative loading API from your site, you
 can use the `wp_speculation_rules_configuration` hook to do so.
 >
 >
 > {{{
 > add_filter( 'wp_speculation_rules_configuration', '__return_null' );
 > }}}
 >
 >
 > I'm going to close this ticket off as wontfix, as I expect the validator
 will recognise the speculation rules API in a future update.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63289#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list