Images require alt text; don't always want captions

jp.stacey - March 6, 2009 - 15:46
Project:Image Assist
Version:6.x-3.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Issue tags:accessibility
Description

Images must always have alt text according to the HTML spec (it can be empty, but the alt="" attribute must be present). However, you don't always want a caption to the side of the image. It's possible to create the image, then delete the caption, but it can be maddening for users (especially non-power users) to have to keep doing that.

Satisfying the HTML spec is an implied legal requirement in the UK (and some organizations' funding depends on accessibility standards, and it's also good for users) so I feel it's important to add flexibility here.

Here's a patch to img_assist.module that adds some checkboxes (default=checked i.e. current behaviour) to the insert-image popup, which mean you can populate the alt attribute without getting a caption. Tested with TinyMCE, but I'm a bit at sea when it comes to e.g. the parent.updateCaption() function - it doesn't seem to be used?

(Patch also works, with hunk offsets, on 5.x-1.7, so should be portable across versions.)

AttachmentSize
patch_img_assist.txt2.19 KB

#1

mgifford - April 4, 2009 - 15:00

Looks like a good idea. There's been some discussion of the need for better image support here - http://groups.drupal.org/accessibility

Do you have a patch for Drupal 6?

#2

mziegmann - July 13, 2009 - 18:06

Subscribing... would also love to see a patch for this for D6. Thanks!

#3

niccap - August 15, 2009 - 20:09

Subscribing

#4

jp.stacey - August 17, 2009 - 15:13
Version:5.x-2.0-alpha1» 6.x-3.x-dev

It ought to still work with offsets changed on D6 - that bit of the code hasn't been changed between the two versions. Here's a patch I just did by hand on 6.x-3.x-dev anyway .

AttachmentSize
img_assist-6.x.patch 2.13 KB
 
 

Drupal is a registered trademark of Dries Buytaert.