[wp-trac] [WordPress Trac] #18984: Accessibility: Title attribute should not be added to image markup by media.php

WordPress Trac noreply at wordpress.org
Thu Nov 29 18:32:55 UTC 2012


#18984: Accessibility: Title attribute should not be added to image markup by
media.php
--------------------------+-----------------------
 Reporter:  esmi          |       Owner:  nacin
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  3.5
Component:  Media         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------

Comment (by nacin):

 Oh. We already do this.

 {{{
 if ( empty($default_attr['alt']) )
         $default_attr['alt'] = trim(strip_tags( $attachment->post_excerpt
 )); // If not, Use the Caption
 if ( empty($default_attr['alt']) )
         $default_attr['alt'] = trim(strip_tags( $attachment->post_title
 )); // Finally, use the title
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18984#comment:33>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list