[wp-meta] [Making WordPress.org] #6173: Add ALT text field to upload form
Making WordPress.org
noreply at wordpress.org
Fri Apr 14 18:06:12 UTC 2023
#6173: Add ALT text field to upload form
-----------------------------+---------------------
Reporter: alexstine | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Photo Directory | Resolution:
Keywords: needs-patch |
-----------------------------+---------------------
Comment (by joedolson):
When `aria-label` is used, it changes the accessible name calculation and
overrides all descendant text. So the use of `aria-label` for the link
that wraps the image means that the complete accessible name for the link
and all its contents is "View larger photo".
I suggest appending "View larger photo: " to the alt text that describes
the image and removing the aria-label. That would allow all the
information to be communicated.
I don't think that dealing with Firefox reading the hidden figcaption is a
huge priority, but we could fix that by using aria-labelledby on the img
to reference the associated figcaption. Because this would override the
alt text on the image, we'd need to have multiple aria-labelledby targets
to include the 'View larger photo' instructions. E.g.
{{{
<img aria-labelledby="instructions id-figcaption" alt="">
<figcaption id="figcaption">Alt text</figcaption>
<span class="screen-reader-text" id="instructions">View larger
photo</span>
}}}
The span, because it's repeated for every image, could be placed as a
single-use text in the footer and let every img reference the same span;
it doesn't need to be reproduced independently for each image.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/6173#comment:24>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list