[wp-trac] [WordPress Trac] #34567: Improve HTML5 support in frontend

WordPress Trac noreply at wordpress.org
Tue Nov 3 11:52:44 UTC 2015


#34567: Improve HTML5 support in frontend
-------------------------+-----------------------------
 Reporter:  flixos90     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 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()` and `disabled()` functions (boolean
 attributes don't need values)
 * link, style and script tags in `WP_Styles` and `WP_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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34567>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list