> For the complete documentation index, see [llms.txt](https://ebay.gitbook.io/oatmeal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ebay.gitbook.io/oatmeal/keyboard.md).

# Keyboard Methods

### Prerequisites

If using Safari, make sure you [fix tabbing in Safari](/oatmeal/help/fix-safari-tabbing.md) before performing any keyboard testing.

To ensure there are no false positives, disable screen reader or any other assistive technology.

### Methods

* [Focus Moveable](/oatmeal/keyboard/focus-is-not-trapped.md)
* [Focus Visible](/oatmeal/keyboard/focus-is-visible.md)
* [Focus Reachable](/oatmeal/keyboard/keyboard-reachable.md)
* [Focus Management](/oatmeal/keyboard/focus-management.md)
* [Skip to Main](/oatmeal/keyboard/skip-to-main.md)
* [Buttons and Links](/oatmeal/keyboard/buttons-and-links.md)

### 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 Moveable: users can traverse through the entire page without getting trapped.
* Focus Visible: users can see where they are at all times.
* Focus Reachable: users can get to all interactive elements on a page.
* Focus Activatable: 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

### Should I test keyboard accessibility on mobile devices?

Yes! Users navigate their mobile devices via Bluetooth Keyboard. We recommend the [Logitech K480](https://www.logitech.com/en-us/products/keyboards/k480-multi-device-wireless.920-006343.html) for testing.

### Guidelines

* [WCAG 2.1.1 (A)](http://www.w3.org/TR/UNDERSTANDING-WCAG20/keyboard-operation-keyboard-operable.html)
* [WCAG 2.1.2 (A)](http://www.w3.org/TR/UNDERSTANDING-WCAG20/keyboard-operation-trapping.html)
* [WCAG 2.4.3 (A)](http://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-focus-order.html)
* [WCAG 2.4.7 (AA)](http://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-focus-visible.html)
