Table of Contents

    When someone using a keyboard to navigate content moves to an element, they must be able to move away from it again. This ensures that people who use a keyboard do not get stuck on any part of the page.

    Accessibility Requirements for 2.1.2 No Keyboard trap (A)

    • Keyboard focus can move to an element and away again.

    Common mistakes for 2.1.2 No Keyboard trap (A)

    • A dialogue opens but cannot be closed with the keyboard, preventing the user from accessing the original content underneath;
    • Content is presented in an infinite scroll, so a keyboard user is forced to tab through everything before they can exit the scroll area.

    Techniques for 2.1.2 No Keyboard trap (A)

    Common Failures for 2.1.2 No Keyboard trap (A)

    The following are common mistakes that are considered failures of Success Criterion 2.1.2 by the WCAG Working Group.

    FAQs for 2.1.2 No Keyboard trap (A)

    Few examples to navigate a website with my keyboard?

    To navigate a website with the keyboard, you can start by hitting the tab key. You should see an indicator on the element that has focus.
    Here are some keyboard navigation basics:
    Tab – move to next interactive element
    Shift + Tab – move to previous interactive element
    Return/Enter – activate elements (links, buttons, etc)
    Space bar – activates buttons (such as to pause/play videos, submit forms, etc)
    Esc – close opened content (modals, navigation menus, etc) or cancel current action
    Arrows – navigate within widgets (tablists, checkboxes within a disclosure button, etc) and navigate around a page

    What is a keyboard trap?

    Just as keyboard users must be able to navigate to all interactive elements on a page with only the keyboard, they must also be able to navigate away from these elements with the keyboard. When they are not able to do so, that is called a keyboard trap. For example, if a user tabs to a button that opens a modal but the user is not able to exit out of that modal, they’ve hit a keyboard trap.

    Useful resources for 2.1.2 No Keyboard trap (A)

    Leave a Reply

    Your email address will not be published.