Tengo esto:
Código:
Lo que hace, es un enlace de hipertexto, cuando se pasa sobre él, hay una imagen que cambia.<div id="menu1" class="menulateral"><a href="prueba.html" onmouseover="set_img_on('b1','b');msg_on(1);return true;" onMouseOut="set_img_off('b1','b');msg_off()">La Prueba</a></div>
Al pasar el validador de accesibilidad: http://webxact3.watchfire.com me dice esto:
Cita:
Entonces, cambio mi código por lo siguiente: Make sure event handlers do not require use of a mouse.
For event handlers that do more than just change the presentation of an element, such as change color when the mouse moves over an item, consider the following:
* Use application-level event triggers rather than user interaction-level triggers. In HTML 4.0, application-level event attributes are "onfocus", "onblur" (the opposite of "onfocus"), and "onselect". These events are triggered when something happens on the page regardless of how the user causes it to happen. For example, an "onfocus" event occurs when a control receives the focus, whether that is done by clicking the mouse or by using the keyboard. By contrast, device-dependent events only occur when a particular device is in use. A "onmousedown" event, which also can give a control the focus, is only triggered by a mouse action, and other means of giving focus to the control will not be responded to
* If you must use device-dependent attributes, provide redundant input mechanisms; for example, specify two handlers for the same element, both of which have the same code associated with them:
For event handlers that do more than just change the presentation of an element, such as change color when the mouse moves over an item, consider the following:
* Use application-level event triggers rather than user interaction-level triggers. In HTML 4.0, application-level event attributes are "onfocus", "onblur" (the opposite of "onfocus"), and "onselect". These events are triggered when something happens on the page regardless of how the user causes it to happen. For example, an "onfocus" event occurs when a control receives the focus, whether that is done by clicking the mouse or by using the keyboard. By contrast, device-dependent events only occur when a particular device is in use. A "onmousedown" event, which also can give a control the focus, is only triggered by a mouse action, and other means of giving focus to the control will not be responded to
* If you must use device-dependent attributes, provide redundant input mechanisms; for example, specify two handlers for the same element, both of which have the same code associated with them:
Código:
Y ahora me pasa el validador, pero no me funciona bien, no me cambia la imagen cuando paso sobre el enlace.<div id="menu1" class="menulateral"><a href="prueba.html" onfocus="set_img_on('b1','b');msg_on(1);return true;" onblur="set_img_off('b1','b');msg_off()">La Prueba</a></div>
Espero que alguien me pueda ayudar.
Gracias.