Empty Alt Text in wp_get_attachment_image()
|Reported by:||miqrogroove||Owned by:||azaozz|
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.
Change History (12)
- Keywords has-patch tested added
- Owner changed from anonymous to Sam_a
- Status changed from new to assigned
- Component changed from General to Media
- Owner changed from Sam_a to azaozz
- Status changed from assigned to new