quailjs / quail

Accessibility testing in the browser and on the server.
http://quailjs.org
Other
300 stars 44 forks source link

Test for WCAG Failure F55: using script to remove focus when focus is received #146

Open hannolans opened 10 years ago

hannolans commented 10 years ago

http://www.w3.org/WAI/GL/WCAG20/NOTE-WCAG20-TECHS-20090105/F55

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, by this practice removes focus entirely, which means the content can only be accessed by a pointer device, such as a mouse.

Procedure

  1. Use the keyboard to verify that you can get to all interactive elements using the keyboard.
  2. Check that when focus is placed on each element, focus remains there until user moves it.

    Failures

  - <input type="submit" onFocus="this.blur();"> 
  - <a onFocus="this.blur()" href="Page.html"><img src="myImage.gif"></a> 
  - <a href="link.html" onfocus="if(this.blur)this.blur();">Link Phrase</a> 
hannolans commented 10 years ago

Is using .blur() the only example for this failure?