# Return key label is contextually appropriate

- **Pattern:** `ab-001974` (`mobile-ux-patterns.keyboard-input.return-key-label`)
- **Severity:** low
- **Lifecycle:** active
- **Last modified:** 2026-04-18
- **Canonical URL:** https://auditbuffet.com/patterns/ab-001974
- **License:** CC-BY-4.0 — attribute to AuditBuffet Pattern Catalog (https://auditbuffet.com/patterns/ab-001974)

## Why it matters

The generic `return` key on a password field gives no signal that pressing it will submit the form — users tap the submit button anyway, making the return key dead weight. On a search field, the wrong label leaves users guessing whether return submits or inserts a newline. Contextual return keys (`done`, `go`, `search`, `send`) are a zero-cost signal that matches the platform convention and reduces form completion time.

## Severity rationale

Low because the wrong return key slows users but does not block form completion.

## Remediation

Set `returnKeyType` per field and wire `onSubmitEditing` so pressing the key actually advances or submits. Use refs to chain focus between fields in multi-input forms:

```tsx
<TextInput placeholder="First" returnKeyType="next" onSubmitEditing={() => lastRef.current?.focus()} />
<TextInput ref={lastRef} placeholder="Last" returnKeyType="done" onSubmitEditing={submit} />
<TextInput placeholder="Search" returnKeyType="search" onSubmitEditing={search} />
```

## Detection

- **ID:** `return-key-label`
- **Severity:** `low`
- **What to look for:** Enumerate all TextInput fields. For each, classify its purpose (form submission, search, multi-field navigation) and check the `returnKeyType` prop. Verify the return key matches: `done` or `go` for final fields, `next` for multi-field forms, `search` for search inputs.
- **Pass criteria:** All TextInput fields have a `returnKeyType` that matches their purpose. At least 100% of final form fields use `done` or `go`, intermediate fields use `next`, search fields use `search`. No inputs use the default `return` key when a more specific option applies.
- **Fail criteria:** Any TextInput uses the generic `return` key type when a contextual option (`done`, `go`, `send`, `search`, `next`) would be more appropriate, or the return key is mismatched with the input purpose.
- **Skip (N/A) when:** App has no text input fields.
- **Detail on fail:** Quote the actual returnKeyType. `"Login form password field uses default return key instead of 'done' or 'go' — unclear that it submits the form."` or `"Search input uses 'return' instead of 'search' return key."`
- **Remediation:** Set contextually appropriate returnKeyType:

  ```tsx
  // Form submission
  <TextInput
    placeholder="Password"
    returnKeyType="done"
    onSubmitEditing={handleSubmit}
  />

  // Search
  <TextInput
    placeholder="Search"
    returnKeyType="search"
    onSubmitEditing={handleSearch}
  />

  // Multi-field form
  <TextInput placeholder="First Name" returnKeyType="next" onSubmitEditing={() => lastNameRef.focus()} />
  <TextInput ref={lastNameRef} placeholder="Last Name" returnKeyType="done" onSubmitEditing={handleSubmit} />
  ```

Taxons: user-experience

HTML version: https://auditbuffet.com/patterns/ab-001974
