Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Feature] Eliminate W3 Validation Warnings for Script and Style type Attributes #404

Open
jessecowens opened this issue Jun 14, 2021 · 0 comments
Labels
Feature Request Feature Request optimization Issues that increase performance

Comments

@jessecowens
Copy link
Member

Is your feature request related to a problem? Please describe.
The HTML5 validator tool at https://validator.w3.org/nu/ throws warnings for including a type attribute for scripts and styles, eg:
Warning: The type attribute is unnecessary for JavaScript resources.
Warning: The type attribute is unnecessary for CSS resources.

Describe the solution you'd like
Since WordPress 5.3, a theme_supports option has been included to pass these validation warnings:
add_theme_support( 'html5', [ 'script', 'style' ] );

Additional context
This issue was reported on the WordPress.org forums.

@jamesros161 jamesros161 added optimization Issues that increase performance Feature Request Feature Request labels Jul 6, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Feature Request Feature Request optimization Issues that increase performance
Projects
None yet
Development

No branches or pull requests

2 participants