I noticed this problem and tested it several different ways,adding captions (the alternative text field) or not, using the edit option to insert alt text or leaving it blank and finally trying just one image.A single image will get alt text or just alt=””,depending on whether or not you leave it blank.But all images within the gallery shortcode will not.I looked at wp-includes/media.php and couldn’t find alt being mentioned anywhere.
But as a final test I checked one of matt’s new gallery posts.
His pictures have alt=””. This gallery post doesn’t validate but for other reasons. Also his pages don’t get the gallery.css inserted into the post or page or where ever there’s a gallery. Mine do.
All my posts or pages with a gallery in them fail validation miserably.
You aren’t supposed to have style tags where the gallery puts inserts them. The detailed list isn’t right either. I get this message:
document type does not allow element “dl” here; missing one of “object”, “applet”, “map”, “iframe”, “button”, “ins”, “del” start-tag.
One final complaint:if I click on an archived post with a gallery in it it prints the css for the gallery as the excerpt of the post.
This doesn’t happen on matt’s site. Which makes me think that the code we got and the code he uses are 2 different things.
- The topic ‘gallery shortcode doesn’t add alt text pages fail validation’ is closed to new replies.