Risikio
07-12-2007, 08:28 PM
Hello everyone,
I am a Javascript newbie. I have been given the task of putting an art gallery on our website. I have successfully used CSS to enlarge the images (and provide a caption with additional information) in the gallery when the user hovers over it with their mouse. The problem is that many (75% or more) of our website visitors are individuals with disabilities. Some are not able to use a mouse. I have not found a way to code a keyboard command in CSS, so I am thinking I may have to write a Javascript to enlarge the images for our users that do not utilize a mouse.
Our previous webmaster used the following code to allow users with visual impairments to change the text size. I was hoping to somehow edit that script to do the same with the images, but as a newbie, I don't know if this is possible. It also appears to me that the script still requires a mouse.
Change Text Size:
<br>
- <a href="javascript:void(0);" onclick="ndeSetTextSize('decr'); return false;" title="Reduce text">Reduce</a><br>
- <a href="javascript:void(0);" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text">Enlarge</a><br>
- <a href="javascript:void(0);" onclick="ndeSetTextSize('reset'); return false;" title="Reset text">Reset</a>
Any help would be greatly appreciated.
Thanks.
I am a Javascript newbie. I have been given the task of putting an art gallery on our website. I have successfully used CSS to enlarge the images (and provide a caption with additional information) in the gallery when the user hovers over it with their mouse. The problem is that many (75% or more) of our website visitors are individuals with disabilities. Some are not able to use a mouse. I have not found a way to code a keyboard command in CSS, so I am thinking I may have to write a Javascript to enlarge the images for our users that do not utilize a mouse.
Our previous webmaster used the following code to allow users with visual impairments to change the text size. I was hoping to somehow edit that script to do the same with the images, but as a newbie, I don't know if this is possible. It also appears to me that the script still requires a mouse.
Change Text Size:
<br>
- <a href="javascript:void(0);" onclick="ndeSetTextSize('decr'); return false;" title="Reduce text">Reduce</a><br>
- <a href="javascript:void(0);" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text">Enlarge</a><br>
- <a href="javascript:void(0);" onclick="ndeSetTextSize('reset'); return false;" title="Reset text">Reset</a>
Any help would be greatly appreciated.
Thanks.