[wp-trac] [WordPress Trac] #63824: button is not a self-closing HTML element and needs a closing tag
WordPress Trac
noreply at wordpress.org
Wed Aug 13 02:36:42 UTC 2025
#63824: button is not a self-closing HTML element and needs a closing tag
-----------------------------+------------------------------
Reporter: kkmuffme | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: trivial | Resolution:
Keywords: has-patch close | Focuses:
-----------------------------+------------------------------
Changes (by joedolson):
* keywords: has-patch => has-patch close
Comment:
This is a jQuery created element, and the value passed into jQuery to
instantiate the element is created with closing tags. See this codepen for
a very simplified example:
https://codepen.io/joedolson/pen/GgpOqar
The actual `button` element in this case doesn't have any text, because
it's hidden and just used as a placeholder. But the created element is
complete. jQuery is creating a DOM object, not raw HTML. This would only
be self-closing if it was being inserted as HTML directly.
So there is no actual issue here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63824#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list