[wp-trac] [WordPress Trac] #64428: Stop sending SCRIPT and STYLE type attribute for default values.

WordPress Trac noreply at wordpress.org
Thu Dec 18 04:05:05 UTC 2025


#64428: Stop sending SCRIPT and STYLE type attribute for default values.
-------------------------+-----------------------------
 Reporter:  dmsnell      |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  HTML API     |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 The `script-loader` and `WP_Styles` both make checks against
 `current_theme_supports( 'html5', 'style' )` and `current_theme_supports(
 'html5', 'script' )`, and multiple places in the rest of the codebase
 unconditionally produce `type="text/css"` and `type="text/javascript"`
 HTML attributes on the associated tags.

 This is a legacy convention predating HTML5 in 2008 and can be removed.
 These are the default values when the attributes are absent, and this does
 not depend on or change with declared theme support.

 Removing the `type` attribute simplifies logic and normalizes the produced
 HTML content.

 This is part of #59883

 See also [https://github.com/WordPress/wordpress-develop/pull/10641
 PR#10641]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64428>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list