Offering the same experience with the mouse and the keyboard allow users to pick their preferred devices.

Additionally, users of assistive technology will also be able to browse the site even if they cannot use the mouse.

Noncompliant Code Example

<a onClick="doSomething();" ...>                                <!-- Noncompliant - 'onKeyPress' missing -->
<a onMouseover="doSomething();" ...>                            <!-- Noncompliant - 'onFocus' missing -->
<a onMouseout="doSomething();" ...>                             <!-- Noncompliant - 'onBlur' missing -->

Compliant Solution

<a onClick="doSomething();" onKeyPress="doSomething();" ...>    <!-- Compliant -->
<a onMouseover="doSomething();" onFocus="doSomething();" ...>   <!-- Compliant -->
<a onMouseout="doSomething();" onBlur="doSomething();" ...>     <!-- Compliant -->