When viewing an inline image, if there is no Title or Description set then the 'alt' attribute is also blank.

Have made patch to add a check for $caption before resetting the node title.

CommentFileSizeAuthor
img_assist.module.patch683 bytesvivaelamor
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vivaelamor’s picture

Version: 6.x-3.x-dev » 6.x-2.0-alpha4

Tested bug and patch for 6.x-2.0-alpha4 and changed version, hoping to get review faster =)

locomo’s picture

Same is true for the title attribute if the image is used as a link - title is blank if no title/description set.

I think its a good practice to set the title attribute so i modified img_assist.module to to include it by default using this patch as a lead

for each of the 3 link types (node, popup, url) i added a title to the attributes array, i.e.

'attributes' => array('title' => $node->title)

sorry, not sure how to make a patch yet, but this is a quick fix if you desire this behavior

linksunten’s picture

Version: 6.x-2.0-alpha4 » 6.x-3.x-dev
Status: Needs review » Reviewed & tested by the community

We can confirm that this important patch works - with a fuzz even for the newest dev version:

$ patch -p0 < img_assist.module_20.patch
patching file img_assist.module
Hunk #1 succeeded at 1473 with fuzz 2 (offset -251 lines).