PDA

View Full Version : Simple Controls Gallery v1.3 - 508 - ALT text?



Anessa05
07-28-2010, 04:54 PM
1) Script Title: Simple Controls Gallery v1.3

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm

3) Describe problem: How can I make this 508 compliant with ALT text for each image in the cross-dissolve? I only need the cross-dissolve feature of this gallery and not the navigation.

ddadmin
07-28-2010, 06:51 PM
Firstly, if you don't need the navigation feature, you might be better off with Ultimate Fade In Slideshow (http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm) instead. For that script, to add an alt attribute to each image (based on the description defined for each image inside the script), find the below chunk of code inside the .js file:


getSlideHTML:function(imgelement){
var layerHTML=(imgelement[1])? '<a href="'+imgelement[1]+'" target="'+imgelement[2]+'">\n' : '' //hyperlink slide?
layerHTML+='<img src="'+imgelement[0]+'" style="border-width:0;" />\n'
layerHTML+=(imgelement[1])? '</a>\n' : ''
return layerHTML //return HTML for this layer
},

and replace that with:


getSlideHTML:function(imgelement){
var layerHTML=(imgelement[1])? '<a href="'+imgelement[1]+'" target="'+imgelement[2]+'">\n' : '' //hyperlink slide?
layerHTML+='<img src="'+imgelement[0]+'" style="border-width:0;" alt="'+imgelement[3]+'" />\n'
layerHTML+=(imgelement[1])? '</a>\n' : ''
return layerHTML //return HTML for this layer
},

That should do it.

Anessa05
07-28-2010, 07:59 PM
Thanks for the quick reply and suggestion!