Input modes and on-screen keyboards
The wrong on-screen keyboard makes people hunt for keys in every field.
The answer
Show the keyboard that matches each field, but accept the same input whatever keyboard appears. As strong as the weakest rule behind it: 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.
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.
- Applies when
- Any field on a touch device.
- Based on
- Practitioner research
- Depends on
- Device and screen
- From research on
- Fitts's law
- Principle
- Let practiced people go faster
- Common mistake
- A full letter keyboard for a card number.
- ExperimentExperiment: Assessing the Usability of Six Data Entry Mobile Interfaces for Caregivers: A Randomized TrialEhrler, 2015
- User researchUser research: Mobile touch keyboards (Baymard blog)Christian Holst, 2015
- StandardStandard: HTML Living Standard, 6.8.9 The inputmode attributeWHATWG
- GuidanceGuidance: inputmode global attribute (MDN)MDN Web Docs, 2026
-
Treat the keyboard choice as a hint. Accept and check input the same way whatever keyboard appears.
The HTML standard says the attribute neither restricts nor validates input. It describes browser behavior and sets no floor.
- Applies when
- Validating input.
- Based on
- Standard or law
- Principle
- Prevent errors
- StandardStandard: HTML Living Standard, 6.8.9 The inputmode attributeWHATWG
- GuidanceGuidance: inputmode global attribute (MDN)MDN Web Docs, 2026
- Guidance: enterkeyhint global attribute (MDN)MDN Web Docs, 2026
The other rules
-
Don’t show a digits-only keyboard where people may need a minus sign, letters or punctuation.
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 and Phone number input.
- Applies when
- Numeric-looking fields such as ZIP codes, reference numbers and negative amounts.
- Based on
- Practitioner research
- Principle
- Prevent errors
- Common mistake
- A digits-only keypad for a ZIP code that contains letters.
- User researchUser research: Mobile touch keyboards (Baymard blog)Christian Holst, 2015
- GuidanceGuidance: inputmode global attribute (MDN)MDN Web Docs, 2026
-
Turn off auto-capitals and autocorrect for names, emails, codes and addresses.
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.
- Applies when
- Fields where the typed text must stay as typed.
- Based on
- Practitioner research
- Principle
- Prevent errors
- Common mistake
- Automatic correction on a surname.
- User researchUser research: Mobile touch keyboards (Baymard blog)Christian Holst, 2015
- GuidanceGuidance: autocapitalize global attribute (MDN)MDN Web Docs, 2026
-
Label the Enter key with what it does, and make the form behave the same whatever label shows.
Browser documentation; no evidence that the label changes speed or errors.
- Applies when
- Multi-field forms on touch devices.
- Based on
- Practitioner research
- Depends on
- Device and screen
- Principle
- Make controls match their effects
- StandardStandard: HTML Living Standard, 6.8.9 The inputmode attributeWHATWG
- GuidanceGuidance: enterkeyhint global attribute (MDN)MDN Web Docs, 2026
-
When the keyboard covers part of the page, let the browser scroll the field into view, keep the next action close, and don’t let fixed bars cover the focused field.
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.
- Applies when
- The keyboard covers part of the page.
- Based on
- Convention
- Principle
- Keep people in control
- GuidanceGuidance: VirtualKeyboard API (MDN)MDN Web Docs, 2025
Accessibility
Open questions
- OpenDoes the keyboard hint change speed or errors on the web? No experiment found.
- OpenNext and done key labels: no evidence.
- OpenKeyboards covering the submit control: nothing found.
Sources
- ExperimentExperiment: Assessing the Usability of Six Data Entry Mobile Interfaces for Caregivers: A Randomized TrialEhrler, 2015
- User researchUser research: Mobile touch keyboards (Baymard blog)Christian Holst, 2015
- StandardStandard: HTML Living Standard, 6.8.9 The inputmode attributeWHATWG
- GuidanceGuidance: inputmode global attribute (MDN)MDN Web Docs, 2026
- Guidance: enterkeyhint global attribute (MDN)MDN Web Docs, 2026
- Guidance: autocapitalize global attribute (MDN)MDN Web Docs, 2026
- Guidance: VirtualKeyboard API (MDN)MDN Web Docs, 2025
Related
- Phone number inputAsk only if you will use it, take it in one field, and accept the number however it is written.Answer: moderate.
- One-time codesUse one field that can be pasted into and filled automatically, and do not submit by itself.Answer: moderate.
- Payment cardTake the card number in one field, with or without spaces, and work out the card type yourself.Answer: moderate.
- EmailUse an email field and check only that the address looks plausible. Suggest a fix for likely typos, but let people continue.Answer: moderate.
- Autofill and identifying input purposeMark each field with what it is for, and never block autofill, pasting or password managers.Answer: settled.
- ZIP and postal codesAccept ZIP and postal codes however they are typed, and don’t require one where people may not have one that works.Answer: weak.