# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ebay.gitbook.io/oatmeal/keyboard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
