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.)
Comment | File | Size | Author |
---|---|---|---|
#4 | img_assist-6.x.patch | 2.13 KB | jp.stacey |
patch_img_assist.txt | 2.19 KB | jp.stacey |
Comments
Comment #1
mgiffordLooks 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?
Comment #2
michellezeedru CreditAttribution: michellezeedru commentedSubscribing... would also love to see a patch for this for D6. Thanks!
Comment #3
cappadona CreditAttribution: cappadona commentedSubscribing
Comment #4
jp.stacey CreditAttribution: jp.stacey commentedIt 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 .
Comment #5
nairb CreditAttribution: nairb commentedThis 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
Comment #6
mgiffordI think this can be closed now unless there is a D7 version..