Guides

Short, tested answers for building forms that work on phones.

Phone keyboard types: iPhone, Galaxy and PixelWhich keyboard an iPhone, Galaxy or Pixel opens for each input type and inputmode, and the characters each one cannot type — checked on real phones.type="number" vs inputmode="numeric"Why ZIP codes, card numbers and one-time codes should use type="text" inputmode="numeric", and when type="number" is still right.Stop iPhone zoom on input focusSafari on iPhone zooms in when a field with text under 16px is tapped. How to stop it without disabling zoom for people who need it.Touch target size: 24px or 44px?WCAG 2.2 asks for 24 × 24 CSS pixels at level AA and 44 × 44 at AAA. Apple and Google recommend 44pt and 48dp. What each means for buttons, links and form fields.autocomplete attribute cheat sheetThe autocomplete tokens for name, email, phone, address, passwords, one-time codes and cards, and why WCAG 1.3.5 asks for them.One-time code input that fills itselfBuild a verification code field that iPhone and Android can fill from the text message: autocomplete="one-time-code", inputmode="numeric" and a single input.Phone number input on mobiletype="tel" opens the phone pad, autocomplete="tel" fills it, and strict patterns block real numbers. A phone field that works on iPhone and Android.ZIP code and postcode inputUS ZIP codes, ZIP+4, UK and Canadian postcodes: which input to use so people can type them on a phone and autofill works.Email input on mobileWhy an email field should use type="email": the @ keyboard, no automatic capital letter, autofill with autocomplete="email" and sensible validation.Feet and inches input on iPhoneA height or room size field with inputmode="decimal" cannot take 12' 6" on an iPhone. What we learned and the inputs that work for feet, inches and fractions.

Found a mistake or want a check added? Write to contact (at) mobileformcheck.com.