Keyboard Methods

Prerequisites

Methods

What is keyboard accessibility?

Keyboard accessibility is sometimes essential for other types of accessibility.

  • Users without fine motor control to use a pointing device rely on some sort of key-based input.

  • Users without sight can't see where the mouse pointer is.

  • Users may also just prefer to use the keyboard alone instead of switching back and forth between a keyboard and mouse.

There are five general principles that need to be met for keyboard accessibility.

  • Focus Indication: Sighted keyboard users can see where they are at all times.

  • No Keyboard Traps: Keyboard users can traverse the page without getting trapped.

  • Keyboard Reachable: Keyboard users can get to all interactive elements on a page.

  • Keyboard Activatable: Keyboard users can interact with all interactive elements on a page.

  • Focus Management: When page content changes, keyboard focus might need to be moved somewhere that makes sense.

Exceptions

  • Input is dependent on the user's movement

    • Handwriting

    • Brush strokes

  • Simulation of real-world controls

  • Trapping focus within a modal dialog

Guidelines