[wp-trac] [WordPress Trac] #8732: Empty Alt Text in wp_get_attachment_image()

WordPress Trac wp-trac at lists.automattic.com
Sat Dec 27 06:16:43 GMT 2008


#8732: Empty Alt Text in wp_get_attachment_image()
--------------------------+-------------------------------------------------
 Reporter:  miqrogroove   |       Owner:  anonymous
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  2.7.1    
Component:  General       |     Version:  2.7      
 Severity:  normal        |    Keywords:           
--------------------------+-------------------------------------------------
 wp_get_attachment_link() calls wp_get_attachment_image() which
 unconditionally returns an empty alt attribute at line 536:

 {{{
                 $html = '<img src="'.attribute_escape($src).'"
 '.$hwstring.'class="attachment-'.attribute_escape($size).'" alt="" />';
 }}}

 This is wrong because wp-admin/media.php?action=edit says under the
 Caption field, "Also used as alternate text for the image".  Therefore,
 wp_get_attachment_image() should be returning the attachment caption.

 fwiw, I believe this also affected the 2.6 branch.  I decided to report
 now that I see it's not fixed yet.

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


More information about the wp-trac mailing list