Non-Conformance Demo for WCAG 2.1, WCAG 2.2 Success Criterion 2.5.2 Pointer Cancellation (Level A)

2.5.2 Conformance Shown with Non-Technical Explanation

Conformance Demo 2.5.2 is about when actions are executed.

The label turned green after you released the mouse button.

W3Schools onclick Event, About Copyright

2.5.2 Non-Conformance Shown with Technical Explanation and Markup

<form class="yesandno" id="sc252">

<label>mouse down</label> <input type="button" id="green" name="yesno" value="turn label green" onclick="MyFunction()" tabindex="1">

</form>

<script>

function MyFunction() {

document.getElementById("sc252").style.color = "green";

}

</script>

The onclick event is better to use than onmousedown for this action.