Technique F50:Failure of Success Criterion 2.2.2 due to a script that causes a blink effect without a mechanism to stop the blinking at 5 seconds or less
About this Technique
This technique relates to 2.2.2 Pause, Stop, Hide (Failure).
This failure applies to technologies that support script-controlled blinking of content.
Failure techniques show examples of how content can fail particular WCAG success criteria. However, content may still satisfy those criteria if it includes equivalent/alternative content or functionality that does meet the normative requirements. See About WCAG Techniques.
Description
Scripts can be used to blink content by toggling the content's visibility on and off at regular intervals. It is a failure for the script not to include a mechanism to stop the blinking at 5 seconds or earlier. See Using scripts to control blinking and stop it in five seconds or less for information about how to modify the technique to stop the blinking.
Examples
Example 1
The following example uses script to blink content, but the blink continues indefinitely rather than stopping after five seconds.
<script>
// blink "on" state
function show(){
document.getElementById("blink1").style.visibility = "visible";
window.setTimeout(hide, 450);
}
// blink "off" state
function hide(){
document.getElementById("blink1").style.visibility = "hidden";
window.setTimeout(show, 450);
}
// kick it off
show();
</script>
<span id="blink1">This content will blink</span>
Tests
Procedure
For each instance of blinking content:
- Determine if the blinking stops in 5 seconds or less.
Expected Results
If #1 is false, then the content fails the Success Criterion.