WordPress image's title is not alt
|Reported by:||odie2||Owned by:||joemcgill|
|Component:||Media||Keywords:||has-patch has-unit-tests commit|
With latest update of Tiled Galleries in Jetpack I found an significant issue on accessibility with images in WordPress.
First, why WordPress use image's title as alt? It's not the same, but Insert Media (attachment 1) and Edit Media (attachment 2) in modal view in visual editor just don't care.
Second, most of images are P1040480.jpg and DSC06635.jpg, so what sense makes to set alt="DSC06635.jpg" to make noise for screen readers?
In most of galleries (like my - even up to 200 random photos of past event) if Editor didn't described photos, it's better to leave empty alt tag (as could be deduced from as we can read on http://accessibility.psu.edu/images/imageshtml/) as system can't provide any alternative info if human didn't provided it.
Attachment 3 and 4.
Omitting that's Tiled Gallery, let's analyze it like normal gallery or some single images inserted. As we can see, image source (src tag) couldn't be loaded, so attachment 3 with empty alt tag displays empty image space, in attachment 4 there is alt attribute set, however it's automatical title of image taken by camera.
For screen readers and search engines the attachment 3 is much better. Of course you can say that attachment 4 is better for non-disabled humans, BUT realize that destination of photos on attachments is just gallery (in this case 77 random photos, not described, because Editor ignorance [I am only Administrator, not Editor]). In this case the screen readers and search engines experience is much more valuable as it's better for them to have nothing instead of noise.
If you follow my thinking you can say: "OK, but what with Editors habits?".
I have following suggestion - force setting alt rather than title with uploading Media. The title field is just designed for title attribute, but attachment 1 and 2 shows that someone missed that concept. Alternative we can make option in Media settings to choose behaviour. Or maybe you, Dear reader have any better ideas?
In fact most of photos are from camera and without changed names, so this is important.
In times when more and more goverments parts and institutions (at least in Poland) decide to use WordPress for their websites and they have to match WCAG 2.0 requirements on certain A(AA) level, and also it have big impact on normal sites, we should solve this issue as fast as we can.
Change History (38)
17 months ago
- Component changed from Media to Gallery
- Severity changed from major to normal
- Keywords needs-patch added; 2nd-opinion removed
- Version changed from 4.3.1 to 4.3
- Milestone changed from Awaiting Review to 4.6
- Owner set to joemcgill
- Status changed from new to assigned