Hi,

My current devs integrates accessibility requirements, and it seems there was some kind of anomaly in the generated images's ALT and TITLE output. Imagecache writes a raw $alt ant $title format, transforming any HTML tags to 'non-human' plain text.

Below is what I modified to obtain user-friendly ALTs and TITLEs.
In imagecache.module at line 893 locate :

$ours = array(
    'src' => imagecache_create_url($presetname, $path, FALSE, $absolute),
    'alt' => $alt,
    'title' => $title,
  );

Then replace it with the following :

$ours = array(
    'src' => imagecache_create_url($presetname, $path, FALSE, $absolute),
    'alt' => trim(substr(strip_tags($alt), 0, 74)),
    'title' => strip_tags($title),
  );

Might not be the best solution, but it's working in my case.

Cheers,

David.

Comments

fizk’s picture

Status: Needs review » Closed (fixed)

Please reopen if this is still an issue with ImageCache 6.x-2.0-rc1.