Make WordPress Core

Changes between Initial Version and Version 4 of Ticket #59432


Ignore:
Timestamp:
09/24/2023 12:28:09 AM (17 months ago)
Author:
sabernhardt
Comment:

Unless/until the handbook changes, self-closing elements should have a slash with the space before it.

Also, if the type attribute is used on style tags such as global styles, the active theme probably needs to declare HTML5 'style' and 'script' support to remove those. (Block-based themes remove the type automatically.)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #59432

    • Property Focuses javascript css performance removed
    • Property Component changed from HTML API to General
  • Ticket #59432 – Description

    initial v4  
    11When validating any WordPress site, warnings appear:
    2 1. Trailing slash on void elements has no effect and interacts badly with unquoted attribute values. Example: <meta name='robots' content='noindex, nofollow'/>
    3 <link rel="alternate" href="https://samesite.com/" hreflang="US"/>
     21. Trailing slash on void elements has no effect and interacts badly with unquoted attribute values. Example: `<meta name='robots' content='noindex, nofollow'/>`
     3`<link rel="alternate" href="https://samesite.com/" hreflang="en-US"/>`
    44Also in tags img, button etc
    552. The type attribute for the style element is not needed and should be omitted.
    6 Example: <style id='global-styles-inline-css' type='text/css'>
     6Example: `<style id='global-styles-inline-css' type='text/css'>`
    773.  The type attribute is unnecessary for JavaScript resources.
    8 Example: <script type='text/javascript' ...>
     8Example: `<script type='text/javascript' ...>`
    99
    1010A suggestion for improvement is to fix these warnings by removing attributes and symbols that are no longer needed. This will reduce the amount of code and relieve SEO optimizers from headaches).