[wp-trac] [WordPress Trac] #34595: Add aria-describedby to improve image/caption relationship
WordPress Trac
noreply at wordpress.org
Thu Nov 5 18:57:11 UTC 2015
#34595: Add aria-describedby to improve image/caption relationship
---------------------------+------------------------------------
Reporter: joedolson | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Keywords: has-patch dev-feedback
Focuses: accessibility |
---------------------------+------------------------------------
See also #27402, where we added `aria-describedby` to gallery output.
Probably should have thought to deal with captioned images at the same
time!
Currently, there's minimal semantic relationship between the caption and
the image, and none that will reliably be recognized by assistive
technology. In theory figure and `figcaption` should provide a
relationship, but this doesn't have adequate support.
In the HTML mode, no relationship exists at all. In HTML mode, I have
doubts about the method to add aria-describedby used in this patch;
`str_replace` feels dirty, but it would be backwards-compatible, where
adding aria-describedby to the `img` element at input would only effect
future images. In HTML4 mode, the relationship has to be between the `img`
and the description, not the container, as in the `figure` relationship.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34595>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list