[wp-trac] [WordPress Trac] #30180: wp_get_attachment_image_src does not return alt or meta

WordPress Trac noreply at wordpress.org
Thu Sep 19 21:50:54 UTC 2019

#30180: wp_get_attachment_image_src does not return alt or meta
 Reporter:  joedolson       |       Owner:  antpb
     Type:  enhancement     |      Status:  assigned
 Priority:  normal          |   Milestone:  Future Release
Component:  Media           |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  needs-dev-note  |     Focuses:  accessibility

Comment (by joemcgill):

 > As said in a previous comment: anything related to the alt attribute,
 which is a so basic accessibility feature, is considered a bug from the
 accessibility team. The ticket type was changed to "bug" after a decision
 of the accessibility team that discussed this ticket during the latest
 bug-scrub. Changing it back to "enhancement" without at least a cross-team
 discussion is a bit unfair and frankly doesn't help cross-teams

 This is a fair criticism, but I would likewise state that changing the
 ticket from an enhancement to a bug without conversation with folks on the
 Media team is a bit unfair, given that the functionality is a part of the
 Media component and we had previously marked this as an enhancement

 Here's the state of things as I understand them:

 1. The ticket was originally a request to add data for the `alt` as a
 return value for `wp_get_attachment_image_src()`. After reviewing with the
 Media team and discussing with @joedolson, the decision was that we should
 not add the `alt` attribute data to that particular function for all the
 reasons .
 2. Rather than close this ticket as a `wontfix`, we proposed adding a new
 function that could be used by theme authors and others that includes the
 `alt` attribute so that we could promote the usage of this new function
 when building image markup, rather than using
 `wp_get_attachment_image_src()` which isn't fit for the purpose of
 building image markup—this new function is an enhancement to WordPress
 because it is providing new functionality, not fixing broken
 3. @ryanshoover created an initial implementation for the new
 functionality, which has since been iterated on, but frankly hasn't
 received feedback in a timely manner. Now that @antpb has picked it up,
 we've identified significant problems with the implementation that we'd
 like to see addressed before adding this new function to WordPress.

 For this to move forward, we'll need an updated implementation that takes
 into account feedback from @azaozz and I earlier today. This may, indeed,
 cause this ticket to slip out of scope of this release—which is
 regrettable, but I believe to be better than introducing this new
 functionality in its current form.

Ticket URL: <https://core.trac.wordpress.org/ticket/30180#comment:71>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list