Problem:
Most surprised to discover an image module ignoring the alt tag in its XHTML output. How can this be? This causes major problems with search engines which look for (1) valid XHTML (fails on missing "alt" and the "data-link" attribute) and (2) for file names and alt tags for image assets. Although having the tag does little for seo, not having it causes real issues, dramatically reducing the efficacy of this fine module.
Solution(?):
"Alt" and "Title" fields available in the media>edit page and I'd also expose these to the upload widget. Obviously we could hard code these into the module(s), but a more forward-looking approach for this fine family of media modules might be an array of tag sets/doctypes, each containing valid value(tag)-key pairs for the various media types. Media API exposes these to individual upload or insert modules.

CommentFileSizeAuthor
#1 1091568-alt.patch603 bytesmeba
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

meba’s picture

Status: Active » Needs review
FileSize
603 bytes

I think there are two parts to this issue. First is solving the missing alt which invalidates the page in Validators, second is a better solution. It would be great if we could solve part 1 right away...

Patch attached. I just changed a static Only local images are allowed. to theme('image') which automatically adds empty alt and all required tags

JacobSingh’s picture

Title: Need img tags on roatating banner images - and a reusable approach to media tagging » Headline should be used for img alt tag
Status: Needs review » Active

Committed the above.
Changed the title to reflect the new feature we should implement to give the alt tag meaning.