Technique F55:Failure of Success Criteria 2.1.1, 2.4.7, 2.4.13, and 3.2.1 due to using script to remove focus when focus is received
About this Technique
This technique relates to:
- 2.1.1 Keyboard (Failure)
- 2.4.7 Focus Visible (Failure)
- 2.4.13 Focus Appearance (Failure)
- 3.2.1 On Focus (Failure)
This failure applies to all content that supports script.
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
Content that normally receives focus when the content is accessed by keyboard may have this focus removed by scripting. This is sometimes done when designer considers the system focus indicator to be unsightly. However, the system focus indicator is an important part of accessibility for keyboard users. In addition, this practice removes focus from the content entirely, which means that the content can only be operated by a pointing device such as a mouse.
Examples
Example 1
<input type="submit" onFocus="this.blur();">
Example 2
<a onFocus="this.blur()" href="Page.html"><img src="myImage.gif"></a>
Example 3
<a href="link.html" onfocus="if(this.blur)this.blur();">Link Phrase</a>
Tests
Procedure
- Use the keyboard to verify that you can get to all interactive elements using the keyboard.
- Check that when focus is placed on each element, focus remains there until user moves it.
Expected Results
- If #2 is false then this failure condition applies and content fails the Success Criterion.