Images require alt text; don't always want captions
| Project: | Image Assist |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
| Issue tags: | accessibility |
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.)
| Attachment | Size |
|---|---|
| patch_img_assist.txt | 2.19 KB |

#1
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
Subscribing... would also love to see a patch for this for D6. Thanks!
#3
Subscribing
#4
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 .