Opened 11 years ago
Closed 10 years ago
#27402 closed defect (bug) (fixed)
Add aria-describedby to image gallery output
Reported by: | joedolson | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Gallery | Keywords: | has-patch 4.0-early commit |
Focuses: | accessibility | Cc: |
Description
With the addition of figcaption and figure support to gallery output, there's limited support for assistive technology to programmatically associate images with their descriptions. Adding aria-describedby to the output would improve cross-browser support as well as adding a programmatic relationship when figcaption/figure is not being used.
See: #26697
Attachments (5)
Change History (27)
#1
@
11 years ago
- Keywords 2nd-opinion added
- Milestone changed from Awaiting Review to 3.9
Seems like this would be a logical pairing with the HTML5 stuff added in #26697.
Looking at 27402.patch, should we not also add the attribute to the $captiontag/figcaption
section a few lines down?
#2
@
11 years ago
Yes; there are problems with this patch. I didn't look carefully enough at what the variables actually represented. I'll take another stab at it. Rally, the $selector-$id ID pair should be moved off $icontag and onto $captiontag.
Will upload update patch shortly.
#3
@
11 years ago
Actually, I'm going to need to pass the aria-describedby parameter into the <img> element, otherwise, this won't work properly in screen readers. Will revise and update.
#4
@
11 years ago
Patch updated. In order to make this work, I had to be able to pass an $attr array through wp_get_attachment_link into wp_get_attachment_image. Tested and works; hopefully I updated the docs appropriately, as well.
#6
@
10 years ago
- Keywords 4.0-early added
- Milestone changed from 3.9 to Future Release
I did some reading on this. I think it's a good change, but it came in a bit late for 3.9. (It also doesn't factor into the HTML5 caption stuff, as in it isn't critical to be paired with it.) Let's get this thoroughly tested and ship it in 4.0.
#7
@
10 years ago
- Keywords 2nd-opinion removed
27402.3.patch adds some coding standards stuff and clarifies the parameter description for $attr
.
#8
@
10 years ago
- Milestone changed from Future Release to 4.1
$image_output = wp_get_attachment_link( $id, $size, false, false, false, $attr );
.... good times.
This ticket was mentioned in IRC in #wordpress-ui by _Redd. View the logs.
10 years ago
This ticket was mentioned in IRC in #wordpress-ui by _Redd. View the logs.
10 years ago
#11
@
10 years ago
Added a refresh of 27402.3.patch (meaning version 3.patch in stead of 4.patch as I mentioned in the description with the patch)
This ticket was mentioned in IRC in #wordpress-ui by RianRietveld. View the logs.
10 years ago
#14
@
10 years ago
- Keywords needs-testing removed
Tested with NVDA + Firefox, works fine. However, be aware most users will read the page line by line (e.g. in virtual mode) en miss the semantic relation.
We can't fix that and just have to wait until fig and figcaption improves in user agents and assistive tech.
#15
@
10 years ago
- Keywords needs-testing added
Expected behavior by screen reader users is that links are accessible in the tab order while captions are generally read using the arrow keys. Browsers are not passing the figcaption info correctly to the DOM yet, so this info isn't getting passed to screen readers. Nonetheless this is the correct way to use the standard and browsers/screen readers will catch up so I recommend this patch be passes.
#20
@
10 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 29914:
Add aria-describedby support to gallery output