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.)

CommentFileSizeAuthor
#4 img_assist-6.x.patch2.13 KBjp.stacey
patch_img_assist.txt2.19 KBjp.stacey
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mgifford’s picture

Issue tags: +Accessibility

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?

michellezeedru’s picture

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

cappadona’s picture

Subscribing

jp.stacey’s picture

Version: 5.x-2.0-alpha1 » 6.x-3.x-dev
FileSize
2.13 KB

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 .

nairb’s picture

Priority: Normal » Major

This is an easy one to implement and goes a long way with accessibility. It has been hanging around for 1.5 years! Come on... :)

I have been applying this patch to my sites for a while. Let me know if there is anything I can do to help push this one though.

Brian

mgifford’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

I think this can be closed now unless there is a D7 version..