[wp-trac] [WordPress Trac] #47456: Improve the user interface to ensure correct usage of the image alt text

WordPress Trac noreply at wordpress.org
Mon Apr 20 14:55:56 UTC 2020


#47456: Improve the user interface to ensure correct usage of the image alt text
-------------------------------------------------+-------------------------
 Reporter:  afercia                              |       Owner:  joedolson
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  high                                 |   Milestone:  5.5
Component:  Media                                |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  wpcampus-report needs-design-        |     Focuses:
  feedback needs-patch                           |  accessibility
-------------------------------------------------+-------------------------

Comment (by afercia):

 > Having an image's previously used captions/alt texts available when
 inserting seems like it would be much more conductive to overall correct
 usage than requiring "on-the-fly" alt-text generation

 This is a common misconception. The alt text is not meant to describe the
 image. Instead, it's meant to describe ''the purpose'' of the image, which
 varies depending on the context. Simple, basic, example:

 - Image of a Boeing 747 taking off.
 -  Case 1: the image is purely decorative and doesn't add any relevant
 information to the page content: needs an empty alt text `alt=""`
 - Case 2: the image is used in a technical article about airplanes to
 illustrate some detail of the taking off process. Thus, the image adds
 relevant information. The alt text needs to describe the relevant
 information regarding the taking off detail.
 - Case 3: the image is used as the only content of a link to the local
 airport: in this case the image needs to describe the link destination.
 This would be totally wrong:

 `<a href="link-to-local-airport-website.html"><img src="boeing747.jpg"
 alt="A Boeing 747 taking off" /></a>`

 this would be correct:

 `<a href="link-to-local-airport-website.html"><img src="boeing747.jpg"
 alt="Go to the xyz airport website" /></a>`

 I hope this clarifies why it's wrong to think there can be one alt text
 that fits all the possible usage cases.

 > Not all authors/content-creators understand or care about the a11y
 requirements of the 'alt' attribute.

 Apart from the fact I'd call that unprofessional, if authors/content-
 creators don't really care about crafting correct alt text, the best
 option in 90% of the cases would be allowing ''purely decorative'' images
 to have an empty alt text by default instead of one filled with not-
 relevant information. Which is one of the goals of this ticket.

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


More information about the wp-trac mailing list