Non-Conformance Demo for WCAG 2.2 Success Criterion Success Criterion 2.1.2 No Keyboard Trap (Level A)

2.1.2 Non-Conformance Shown with Non-Technical Explanation

Portions of this page that usually do not receive focus have been given focus to aid in illustrating this example. A command to click the mouse as soon as the link receives focus has added to the "Oh, no" and "It's a trap" links below. The effect is to automatically redirect the focus away from the link. The end result is that the user cannot tab to the remaining page links.

Go to top of page.

Go to bottom of page.

Oh, no!

It's a Trap!

2.1.2 Non-Conformance Shown with HTML Markup and Technical Explanation

<a id="keyboard" href="#trap" onfocus="click()" tabindex="3">Oh, no</a>!

onfocus and click() are not designed to be used together.