[wp-trac] [WordPress Trac] #24499: Twenty Thirteen: Remove trailing slashes on void elements, remove type attribute from script

WordPress Trac noreply at wordpress.org
Wed Jun 5 16:21:32 UTC 2013


#24499: Twenty Thirteen: Remove trailing slashes on void elements, remove type
attribute from script
---------------------------+-----------------------------
 Reporter:  retlehs        |      Owner:
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Bundled Theme  |    Version:  trunk
 Severity:  normal         |   Keywords:  dev-feedback
---------------------------+-----------------------------
 It'd be nice if Twenty Thirteen had these small changes made since it's
 using an HTML5 doctype. You can find a lot of discussions on the web
 talking about these two things - the general consensus is that it's best
 practice to avoid these patterns.

 == Remove trailing slashes ==

 The XHTML-style closing slashes are optional and ideally should be removed
 from the `<meta>` and `<link>` elements.

 http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements

 == Remove type attribute from `script` ==

 > The type attribute gives the language of the script or format of the
 data. If the attribute is present, its value must be a valid MIME type.
 The charset parameter must not be specified. The default, which is used if
 the attribute is absent, is "text/javascript".

 http://www.w3.org/html/wg/drafts/html/master/scripting-1.html#the-script-
 element

 ----

 Current code:

 {{{
 <head>
     <meta charset="<?php bloginfo( 'charset' ); ?>" />
     <meta name="viewport" content="width=device-width" />
     <title><?php wp_title( '|', true, 'right' ); ?></title>
     <link rel="profile" href="http://gmpg.org/xfn/11" />
     <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
     <!--[if lt IE 9]>
     <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"
 type="text/javascript"></script>
     <![endif]-->
     <?php wp_head(); ?>
 </head>
 }}}

 Proposed:

 {{{
 <head>
     <meta charset="<?php bloginfo( 'charset' ); ?>">
     <meta name="viewport" content="width=device-width">
     <title><?php wp_title( '|', true, 'right' ); ?></title>
     <link rel="profile" href="http://gmpg.org/xfn/11">
     <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
     <!--[if lt IE 9]>
     <script src="<?php echo get_template_directory_uri();
 ?>/js/html5.js"></script>
     <![endif]-->
     <?php wp_head(); ?>
 </head>
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24499>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list