# Input modes and on-screen keyboards

> The wrong on-screen keyboard makes people hunt for keys in every field.

Area: Mobile and touch. Evidence behind the answer: Moderate. Last checked November 12, 2026.
Page: https://uxreference.com/mobile/input-modes

## The answer

Show the keyboard that matches each field, but accept the same input whatever keyboard appears.

- **Moderate.** Ask for the keyboard that fits: a number pad for digits, one with a decimal point for amounts, and the email or URL layout for those. (https://uxreference.com/mobile/input-modes#rule-1)
- **Moderate.** Treat the keyboard choice as a hint. Accept and check input the same way whatever keyboard appears. (https://uxreference.com/mobile/input-modes#rule-2)

## The problem

On a phone the keyboard shown decides how fast and how accurately people can type, and the wrong one adds key presses to every field.

## How to decide

None. Short entry: documentation and one practitioner source. The per-field choices live in the form entries.

## Every rule

Each rule has a grade: Settled (required by WCAG AA or law, or replicated research), Strong, Moderate, Weak, or Unsettled (use the stated default until the evidence settles).

#### Rule 1. Moderate

Ask for the keyboard that matches the data: a number pad for digits, one with a decimal point for amounts, the email and web address layouts for those.

- Applies when: Any field on a touch device.
- Based on: Practitioner research
- Depends on: Device and screen
- Principle: Let practiced people go faster

Why: The HTML standard and browser documentation define the hint. One practitioner source reports fewer typos with number pads, test size unstated. A study of 146 hospital staff found a numeric keypad the fastest and most accurate of six ways to enter numbers; it compared custom interfaces, not this hint. No experiment isolating the hint was found.

Sources: [inputmode global attribute (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/inputmode); [HTML Living Standard, 6.8.9 The inputmode attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute); [Mobile touch keyboards (Baymard blog)](https://baymard.com/blog/mobile-touch-keyboards); [Assessing the Usability of Six Data Entry Mobile Interfaces for Caregivers: A Randomized Trial](https://humanfactors.jmir.org/2015/2/e15)

Link: https://uxreference.com/mobile/input-modes#rule-1

#### Rule 2. Moderate

Treat the keyboard choice as a hint only. Accept and check the input the same whatever keyboard appeared.

- Applies when: Validating input.
- Based on: Standard or law
- Principle: Prevent errors

Why: The HTML standard says the attribute neither restricts nor validates input. It describes browser behavior and sets no floor.

Sources: [HTML Living Standard, 6.8.9 The inputmode attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute); [inputmode global attribute (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/inputmode); [enterkeyhint global attribute (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/enterkeyhint)

Link: https://uxreference.com/mobile/input-modes#rule-2

#### Rule 3. Moderate

Do not show a digits-only keyboard where people may need a minus sign, letters or punctuation.

- Applies when: Numeric-looking fields such as ZIP codes, reference numbers and negative amounts.
- Based on: Practitioner research
- Principle: Prevent errors

Why: Browser documentation warns the number pad may lack a minus key. One practitioner source observed a phone keypad without the punctuation shown in the format example. See [ZIP code](https://uxreference.com/forms/postcode) and [Phone number input](https://uxreference.com/forms/phone).

Sources: [inputmode global attribute (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/inputmode); [Mobile touch keyboards (Baymard blog)](https://baymard.com/blog/mobile-touch-keyboards)

Link: https://uxreference.com/mobile/input-modes#rule-3

#### Rule 4. Weak

Turn off automatic capitals and automatic correction for names, email addresses, codes and addresses.

- Applies when: Fields where the typed text must stay as typed.
- Based on: Practitioner research
- Principle: Prevent errors

Why: One practitioner source saw people delete an automatic capital in email fields and saw correction change valid names. Browsers never capitalize in email, web address and password fields. No standard for turning off correction was found.

Sources: [Mobile touch keyboards (Baymard blog)](https://baymard.com/blog/mobile-touch-keyboards); [autocapitalize global attribute (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocapitalize)

Link: https://uxreference.com/mobile/input-modes#rule-4

#### Rule 5. Weak

Label the Enter key for what it will do, and make the form behave the same whatever label shows.

- Applies when: Multi-field forms on touch devices.
- Based on: Practitioner research
- Depends on: Device and screen
- Principle: Make controls match their effects

Why: Browser documentation; no evidence that the label changes speed or errors.

Sources: [enterkeyhint global attribute (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/enterkeyhint); [HTML Living Standard, 6.8.9 The inputmode attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute)

Link: https://uxreference.com/mobile/input-modes#rule-5

#### Rule 6. Unsettled

How to keep the field in use and the submit control clear of the keyboard is unsettled.

Until the evidence settles, use this default: Rely on the browser to scroll the field into view, keep forms short enough that the next action is near the field, and make sure nothing fixed covers the focused field (WCAG 2.4.11).

- Applies when: The keyboard covers part of the page.
- Based on: Convention
- Principle: Keep people in control

Why: Browsers scroll the focused field into view by default. A newer browser feature for laying out around the keyboard is marked experimental. No usability evidence found.

Sources: [VirtualKeyboard API (MDN)](https://developer.mozilla.org/en-US/docs/Web/API/VirtualKeyboard_API)

Link: https://uxreference.com/mobile/input-modes#rule-6

## Accessibility requirements

- WCAG 1.3.5 (AA) Identify Input Purpose is covered in [Autofill and identifying input purpose](https://uxreference.com/forms/autofill). (https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html)
- WCAG 2.4.11 (AA) applies if fixed content covers the focused field. (https://www.w3.org/WAI/WCAG22/Understanding/focus-not-obscured-minimum.html)

## Common mistakes

- A full letter keyboard for a card number.
- A digits-only keypad for a ZIP code that contains letters.
- Automatic correction on a surname.

## Still open

- Does the keyboard hint change speed or errors on the web? No experiment found.
- Next and done key labels: no evidence.
- Keyboards covering the submit control: nothing found.

## Related problems

- [Phone number input](https://uxreference.com/forms/phone): Ask only if you will use it, take it in one field, and accept the number however it is written.
- [One-time codes](https://uxreference.com/forms/one-time-code): Use one field that can be pasted into and filled automatically, and do not submit by itself.
- [Payment card](https://uxreference.com/forms/payment-card): Take the card number in one field, with or without spaces, and work out the card type yourself.
- [Email](https://uxreference.com/forms/email): Use an email field and check only that the address looks plausible. Suggest a fix for likely typos, but let people continue.
- [Autofill and identifying input purpose](https://uxreference.com/forms/autofill): Mark each field with what it is for, and never block autofill, pasting or password managers.
- [ZIP and postal codes](https://uxreference.com/forms/postcode): Accept ZIP and postal codes however they are typed, and don’t require one where people may not have one that works.

## Sources

- [inputmode global attribute (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/inputmode). MDN Web Docs, 2026, component documentation.
- [HTML Living Standard, 6.8.9 The inputmode attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute). WHATWG, n.d., normative standard.
- [Mobile touch keyboards (Baymard blog)](https://baymard.com/blog/mobile-touch-keyboards). Christian Holst, Baymard Institute, 2015, benchmark of 48 US mobile e-commerce sites (2013 and 2015) plus unstated usability testing.
- [Assessing the Usability of Six Data Entry Mobile Interfaces for Caregivers: A Randomized Trial](https://humanfactors.jmir.org/2015/2/e15). Ehrler, Haller, Sarrey, Walesa, Wipfli, Lovis; JMIR Human Factors 2(2):e15, 2015, randomized crossover trial.
- [enterkeyhint global attribute (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/enterkeyhint). MDN Web Docs, 2026, component documentation.
- [autocapitalize global attribute (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocapitalize). MDN Web Docs, 2026, component documentation.
- [VirtualKeyboard API (MDN)](https://developer.mozilla.org/en-US/docs/Web/API/VirtualKeyboard_API). MDN Web Docs, 2025, API documentation.

---
From Solved Problems in UX by Athen Pellicci, an evidence-graded reference of web interface problems. CC BY 4.0. https://uxreference.com/
