Form inputs use appropriate types for mobile keyboards
Why it matters
An email field with type="text" gives mobile users the default alphabetic keyboard with no @ key and no autocomplete hint to the browser. Phone fields with type="text" force the user to hunt for numeric keys on a letter keyboard. Beyond typing friction, the wrong input type blocks browser-native validation, autofill, and password manager integrations. Correct input types are a two-character change that materially improves mobile form completion rates.
Severity rationale
Medium because wrong input types add friction to every form submission on mobile, reducing conversion across sign-up and checkout.
Remediation
Set type to match the data: email, tel, number, url. When formatting constraints rule out type="number" (e.g., credit card with spaces), use type="text" inputmode="numeric" pattern="[0-9]*" to get the numeric keyboard without losing the formatting control.
<input type="email" />
<input type="tel" />
<input type="text" inputmode="numeric" pattern="[0-9]*" />
Detection
-
ID:
input-types -
Severity:
medium -
What to look for: Examine form input elements. Check the
typeattribute on<input>elements. Look for inputs collecting email addresses usingtype="text", phone numbers usingtype="text", numeric values usingtype="text", and URLs usingtype="text". Also check forinputmodeattribute usage wheretype="text"is intentionally retained. -
Pass criteria: Count all
<input>elements that collect email addresses, phone numbers, numeric values, or URLs. For each, verify thetypeattribute matches the input purpose:type="email"for email,type="tel"for phone,type="number"for numeric,type="url"for URLs. Aninputmodeattribute is an acceptable alternative whentype="text"must be retained. Report: "X of Y specialized inputs use the correct type or inputmode." No more than 0 specialized inputs may usetype="text"without an appropriateinputmode. -
Fail criteria: At least 1 email, phone, number, or URL input uses
type="text"without an appropriateinputmodeattribute — mobile users will not get the optimized keyboard. -
Skip (N/A) when: Never.
-
Detail on fail:
"Email input in sign-up form uses type='text' instead of type='email' — 1 of 4 specialized inputs lacks correct type, mobile users won't get the email keyboard". -
Remediation:
<input type="email" /> <!-- @ symbol on keyboard --> <input type="tel" /> <!-- numeric keypad --> <input type="number" /> <!-- number keyboard --> <input type="url" /> <!-- .com key and slash --> <!-- For formatted inputs where type='number' causes issues: --> <input type="text" inputmode="numeric" pattern="[0-9]*" />
Taxons
History
- 2026-04-18·v1.0.0·Initial import from mobile-responsiveness·automated