Opened 9 years ago
Last modified 4 years ago
#34567 new enhancement
Improve HTML5 support in frontend
Reported by: | flixos90 | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | close |
Focuses: | Cc: |
Description
With this ticket I'd like to discuss about HTML5 support in WordPress. While theme authors are able to add support for HTML5, only some parts of WordPress respond to that appropriately. We have several components (like gallery, search form etc) which can be printed in HTML5 if needed, but then there are lots of other areas which are not printed in valid HTML5.
I would like to know if there is any particular reason that this has not been improved yet or if it's simply something that no one has taken a deeper look into yet.
Some areas that could be improved are:
- the
checked()
,selected()
anddisabled()
functions (boolean attributes don't need values) - link, style and script tags in
WP_Styles
andWP_Scripts
(type attributes not needed, CDATA not needed, link tags shouldn't have a self-closing slash at the end) - meta and link tags hooked into
wp_head
(no self-closing slash) - all img tags generated (no self-closing slash)
The above are probably just a fraction of what could be adjusted. I've always used some custom mu-plugin to address this issue and have valid HTML5 in more locations, but it would be great if Core supported it out-of-the-box.
Of course all HTML code should only be changed if the theme has declared 'html5'
support. An important thing to think of here would be whether small things like those above actually need to exist as individual arguments in add_theme_support( 'html5', $arguments )
or if simply adding general support for HTML5 is enough to adjust them.
I'd be glad to work on this enhancement if it was approved for core.
Change History (5)
This ticket was mentioned in Slack in #core by noisysocks. View the logs.
5 years ago
#4
@
5 years ago
- Keywords close added; dev-feedback 2nd-opinion removed
Hi @flixos90, thanks for creating this. We had a discussion about this during a triage session in slack. It looks like in the intervening years some of these things have been tackled separately (thanks @SergeyBiryukov for finding those tickets).
The suggestion is to close this ticket and create smaller individual tickets for anything still remaining. What do you think?
Related: