Just wanted to let you know that after installing your module and activating the image caption filter today, which works great by the way, I was rather dismayed to learn that a clients site pages were pasted with a rather stupidly styled "No alternate text on picture! - define alternate text in image properties." I won't get into the fact that you did not document the "alt" requirement in your readme file. Nor did you apparently determine that your "warning" message was wrapped in deprecated "font" tags. I am well aware of the need for alt tags for images, but there are times when multiple editors for a large client site like mine forget to add alt text. You did some really nice JQuery work here. Try to remember not to make yourself look like a damn zealot for accessibility at the same time. Either document this warning (perhaps in the dumb pink styling you used for the alt warning) or strip out the pregmatch for that. Thank you.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | image_caption_filter.patch | 1.31 KB | marcomatic |
Comments
Comment #1
-Mania- commentedYep, this is a really bad 'feature'. Not only does it print out massive warning messages but it seems to print these for some images that have alt="" also. There are valid reasons to have the alt-attribute empty.
For now will have to use the JQuery module but would like to see this fixed.
Comment #2
marcomatic commentedAny chance we can loose this starting at line 73? I am all about standards too but this is turd in a shiny module.
edit: Just realized the author of this module did not write the filter. But either way this should be taken out of the module or built in as an option.
//See if there is an alt attribute in the
tag, if not insert a LOUD warning
preg_match ('/alt=\"(.+?)\"/i', $imgText, $matches);
$alt = $matches[1];
if (empty($alt)) {
$alt_warning = 'No alternate text on picture! - define alternate text in image properties';
} else {
$alt_warning = '';
}
Comment #3
davidwhthomas commentedHi, I will look into this shortly. patches are welcome in the meantime.
Comment #4
marcomatic commentedI just tried this out and it seems to be working.
Comment #5
davidwhthomas commentedAlt text warning removed and released in 6.x.2.5 http://drupal.org/node/703262
Comment #6
davidwhthomas commentedComment #8
fletchgqc commentedSorry this was my work - it was a custom bit of code for a particular client, it shouldn't have made its way in to the module. But wasn't that pink colour nice?