[wp-trac] [WordPress Trac] #28065: <style type='text/css'> should be <style scope> in wp-includes media.php

WordPress Trac noreply at wordpress.org
Tue Apr 29 20:50:00 UTC 2014

#28065: <style type='text/css'> should be <style scope> in wp-includes media.php
 Reporter:  La Geek       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  3.9
 Severity:  normal        |   Keywords:
  Focuses:                |
 You can't see it in theme "twenty fourteen". But if you activate e.g.
 genesis, you'll get a valdiation error -> "Element style is missing
 required attribute scoped."

 This error is a result of line 1015 in wp-includes/media.php of WP 3.9
 final version

 if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) {
                 $gallery_style = "
                 <style type='text/css'>
                         #{$selector} {
                                 margin: auto;

 Change <style type='text/css'> to <style scope> and the validation error
 is fixed. More informations -> [http://html5doctor.com/the-scoped-

 I would apply a patch, if I would know, how to do this here. This here is
 not github. And on github I pulled wp 4.0, for this I could do a patch.
 But I guess here is another tracking and subversion system so I am lost.
 However it is only one line, that must be changed, so no big deal also
 without a patch of mine :)

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

More information about the wp-trac mailing list