inline images missing 'alt' attribute if Title and Description are not set.

vivaelamor - February 4, 2009 - 21:38
Project:Image Assist
Version:6.x-2.0-alpha4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

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.

AttachmentSize
img_assist.module.patch683 bytes

#1

vivaelamor - September 18, 2009 - 10:22
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 =)

#2

locomo - October 9, 2009 - 01:19

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

 
 

Drupal is a registered trademark of Dries Buytaert.