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.

CommentFileSizeAuthor
#4 image_caption_filter.patch1.31 KBmarcomatic

Comments

-Mania-’s picture

Yep, 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.

marcomatic’s picture

Any 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 Only local images are allowed. 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 = '';
}

davidwhthomas’s picture

Hi, I will look into this shortly. patches are welcome in the meantime.

marcomatic’s picture

StatusFileSize
new1.31 KB

I just tried this out and it seems to be working.

davidwhthomas’s picture

Alt text warning removed and released in 6.x.2.5 http://drupal.org/node/703262

davidwhthomas’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

fletchgqc’s picture

Sorry 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?