![]() ![]() |
9.3:H209002 Make sure that event handlers do not require use of a mouse.Improper designIn the improper design below, when the mouse moved to the position of the image, the dialogue box ˇuThe come about of the Boxster name......ˇvappeared, in other words, one can only activate the dialogue box by the use of the mouse and not by other methods. This may cause significant obstruction for those who can not use mouse. Improper design: <IMG onmouseover="alert('the come about of the Boxster name......')" src="boxster01.jpg"> <IMG onmouseover="alert('introducing other makes of Boxster:Boxster , BoxsterS ......')" src="boxster02.jpg"> End of example Proper demonstrationIn the proper example, the use of onfocus element was aided with the use of onmouseover element, therefore, the activation of the dialogue can be operated by keyboard as well the mouse. Proper example: <IMG onmouseover="alert('The come about of Boxster name......')" onfocus="alert(' The come about of Boxster name......')" tabindex="2" src="boxster01.jpg"> <IMG onmouseover="alert('introducing other makes of Boxster:Boxster,BoxsterS ......')" onfocus="alert('introducing other makes of Boxster:Boxster,Boxster S ......')" tabindex="3" src="boxster02.jpg"> End of example |
![]() |