[wp-meta] [Making WordPress.org] #5985: Accessibility: Use caption in ALT text for single photos

Making WordPress.org noreply at wordpress.org
Thu Feb 24 21:04:23 UTC 2022

#5985: Accessibility: Use caption in ALT text for single photos
 Reporter:  alexstine                |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:
Component:  Photo Directory          |  Resolution:
 Keywords:  has-patch needs-testing  |

Comment (by coffee2code):

 We don't currently define ALT attribute on the photo `img` tag ''at all''
 on single photo pages at present.


 `<img class="single-photo" src="{url}" srcset="{srcsets}">`

 To clarify, the string of letters/numbers (the "20661e8d52" in the
 attached photo) is the title of the single page containing the photo. Its
 appearance in the Twitter link preview is undoubtedly because that text is
 explicitly configured as the `og:title` of the page, and I'm not sure that
 it relates to the presence (or not) of the ALT attribute for the `img`
 tag. (May suggest a different concern though, worth a separate ticket.)

 So I'm not clear which is the current best approach given the current
 situation and until we properly allow for an ALT input field:

 1. Leave things as-is (no ALT attribute at all)
 2. Add an ALT attribute but make it an empty string (`alt=""`)
 3. Something else? (text appears in `figcaption` as done presently, but
 also duplicated in ALT?)

Ticket URL: <https://meta.trac.wordpress.org/ticket/5985#comment:8>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org

More information about the wp-meta mailing list