Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/05/2007, 09:52
Vane_
 
Fecha de Ingreso: febrero-2007
Mensajes: 244
Antigüedad: 17 años, 2 meses
Puntos: 0
Problema validador

Hola a todos,

Tengo esto:

Código:
<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>
Lo que hace, es un enlace de hipertexto, cuando se pasa sobre él, hay una imagen que cambia.

Al pasar el validador de accesibilidad: http://webxact3.watchfire.com me dice esto:

Cita:
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:
Entonces, cambio mi código por lo siguiente:

Código:
<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>
Y ahora me pasa el validador, pero no me funciona bien, no me cambia la imagen cuando paso sobre el enlace.

Espero que alguien me pueda ayudar.

Gracias.