An alt attribute containing a textual equivilent is required on all images providing information to the user under the Web Accessibility Initiative.
At present the only patch for image.module is to use the title as the alt attribute, this is not accessible or flexible enough, we need a real alt text field on image.
Comments
Comment #1
chx commentedComment #2
sunOften one in fact is in the need of placing an alt text but no title or description (which are displayed) on an image.
So it should go like this:
alternative textto image attributes.This replacement should take place on viewing an image, not on editing.
Comment #3
Egon Bianchet commentedIMHO it's redundat to put a description in the alt attribute when displaying an image node, since there's the node title and description.
When the image is displayed inside another node, then the alt text is important. Doesn't the image_attach module do this already?
Comment #4
sun@egon: It's not about opinions. It's about according and fulfilling W3C standards, in particular the WAI. Any image displayed on a website has to have an alt attribute to let visitors with disabilities know what is shown on the image.
As other modules, such as img_assist, depend on the availability of an additional attribute (and logic) for alternative information, I believe that image module should manage this. People will not install another module to get a 'feature' which should be taken into account by the core module.
Comment #5
Egon Bianchet commentedsun, I know the WAI :-)
But think about a visitor forced to go through:
If the alt text is the same as the title or description ... WAI is happy but the user isn't. If the alt text wouldn't add anything to the title or the description, we should just leave it blank.
See also Identical alt and subsequent words by Joe Clark.
Comment #6
sunWe have to distinguish between the input and the output.
Regarding the output the alt attribute should always be set, regardless of the user input. I can understand the idea from Joe Clark - but without a little more KI Drupal does not know whether the text following an image is in fact describing the image. At least the W3C HTML Validator should not return any bad messages. To achieve that I would propose the method mentioned in #2.
Regarding the input: Can't we make the alt attribute optional? In terms of usability a regular user would not want to care about the alt attribute. He/she would believe that this information is handled by the CMS. But more experienced users or even users who are maintaining a accessible website want to define the contents of the alt attribute separately. Most importantly there is no way to set an alt attribute for an image for which is no title nor a description set. Furthermore, in terms of SEO this is inoperative.
Comment #7
drewish commentedif you don't like what's provided, you can do this by adding a theme_display_image function.
Comment #8
(not verified) commented