[wp-trac] [WordPress Trac] #62107: The WordPress media library does not use its own alt text

WordPress Trac noreply at wordpress.org
Fri Sep 27 19:43:54 UTC 2024


#62107: The WordPress media library does not use its own alt text
----------------------------+----------------------------
 Reporter:  CynicalStudios  |       Owner:  joedolson
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:
Component:  Media           |     Version:  trunk
 Severity:  normal          |  Resolution:  invalid
 Keywords:  has-patch       |     Focuses:  accessibility
----------------------------+----------------------------
Changes (by joedolson):

 * status:  accepted => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 I've looked into this, and while this is technically true, it is not an
 accessibility issue. In all cases where the images are displayed in the
 media library, they are wrapped in controls - either a link or a
 `role="checkbox"` with an `aria-label` attribute that provides the
 accessible name.

 This was a decision made in how to design this interface for a few
 reasons. One, using the alt directly can lead to an empty accessible name
 if the image has a blank alt text. This may be legitimate in the image's
 use context, but is never appropriate in the admin. Second, we don't
 define an alt text for non-image media, but we do list them in the
 library. In this case, they need to use the name field anyway.

 Using the alt text in these contexts would 1) be overridden by the
 wrapping `aria-label` and 2) could lead to a confusing interface due to
 the wide ranging content an alt text can contain.

 In the upload media interface, the added image is shown with an empty alt
 text, but is not linked. At that time, we don't yet have any alternative
 text, but the name of the file is shown as a link. Since that's the only
 information known at this stage, this is appropriate.

 Given this context, I'm going to close this ticket as invalid; but feel
 free to continue the conversation. Thank you!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62107#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list