[wp-trac] [WordPress Trac] #59432: Compliant with W3C coding standards
WordPress Trac
noreply at wordpress.org
Sat Sep 23 18:21:44 UTC 2023
#59432: Compliant with W3C coding standards
-------------------------+------------------------------
Reporter: agypten | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.3.1
Severity: minor | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by knutsp):
Replying to [ticket:59432 agypten]:
> When validating any WordPress site, warnings appear:
> 1. Trailing slash on void elements has no effect and interacts badly
with unquoted attribute values. Example: <meta name='robots'
content='noindex, nofollow'/>
> <link rel="alternate" href="https://samesite.com/" hreflang="US"/>
> Also in tags img, button etc
Since WordPress always use quoted attributes, this warning/notice should
be ignored. The void element marker (/) is allowed, just "meaningless
sugar", but not forbidden, in HTML5.
Therefore, and since very old, non-xhtml ready, browsers are not
supported, the very common space before the / is not needed, imho.
The self-closing indicator just makes the markup a bit more XHTML friendly
and a reminder to the human html source reader that the element cannot
have content nor a separate closing tag, and in case some theme author
want to (try to) serve XHTML5 application format.
For the next points, yes, just remove, as just old and useless.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59432#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list