Element

all elements

Error Type

Known

Guidelines

  • BITV 1.0 (Level 2)
    Guideline GroupLevel 1
    Guideline Subgroup6.4 For scripts and applets, ensure that event handlers are input device-independent.
  • Stanca Act
    Guideline GroupRequirement 16: Script/Object Accessible
  • WCAG 1.0 (Level AAA)
    Guideline GroupPriority 2
    Guideline Subgroup6.4 For scripts and applets, ensure that event handlers are input device-independent.
  • WCAG 2.0 (Level A)
    Guideline Group2.1 Keyboard Accessible: Make all functionality available from a keyboard.
    Guideline SubgroupSuccess Criteria 2.1.1 Keyboard (A)
  • WCAG 2.0 (Level AA)
    Guideline Group2.1 Keyboard Accessible: Make all functionality available from a keyboard.
    Guideline SubgroupSuccess Criteria 2.1.1 Keyboard (A)
  • WCAG 2.0 (Level AAA)
    Guideline Group2.1 Keyboard Accessible: Make all functionality available from a keyboard.
    Guideline SubgroupSuccess Criteria 2.1.1 Keyboard (A)

Requirement

All onmousedown event handlers have an associated onkeydown event handler.

Error

onmousedown event missing onkeydown event.

Short Description

Any element that contains an onmousedown attribute must also contain an onkeydown attribute.

How To Repair

Add an onkeydown handler to your script that performs the same function as the onmousedown function.

Steps To Check

Procedure

1. Check each element in the document for an onmousedown attribute.
2. If the element contains an onmousedown attribute then check if it also contains an onkeydown attribute.

Expected Result

1. All onmousedown event handlers have an associated onkeydown event handler.

Failed Result

1. Add a valid onkeydown attribute to the element.

Examples

Pass Examples

Contains an element that has an onmousedown attribute and an onkeydown attribute.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>OAC Testfile - Check #104.2 - Negative</title>
</head>
<body>

<input name="num" onmousedown="foo" onkeydown="bar" value="0"/>

</body>
</html>

Fail Examples

Contains an element that has an onmousedown attribute without an onkeydown attribute.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>OAC Testfile - Check #104.1 - Positive</title>
</head>
<body>

<input name="num" onmousedown="foo"  value="0"/>

</body>
</html>
Web site engine's code is copyright © 2023
Inclusive Design Institute