Touch Targets and Mobile Forms: Sizes, Spacing, Input Types and Autofill That Reduce Drop-Off

Most people use your site with one thumb, on a small screen, often while walking or in poor light. Two things decide whether they succeed: whether they can hit what they meant to tap, and whether the forms are painless to complete. Tiny links, tightly packed buttons and forms that open the wrong keyboard turn a good page into a frustrating one. The fixes are mostly a few lines of HTML and CSS.

This guide covers touch target size and spacing, the HTML attributes that make mobile forms easy, validation and error handling, and how to test on real devices. It complements the Responsive Web Design Testing Checklist, CSS Viewport Units and the 100vh Problem and the On-Page SEO Checklist.

Part 1: Touch targets

What size should a tap target be?

A fingertip is much blunter than a mouse pointer. Several guidelines give minimum sizes:

GuidelineSizeNotes
WCAG 2.2, 2.5.8 Target Size (Minimum), Level AA24 × 24 CSS pxSmaller targets are allowed if enough spacing exists or an exception applies
WCAG 2.5.5 Target Size (Enhanced), Level AAA44 × 44 CSS pxStricter recommended level
Apple Human Interface Guidelines44 × 44 ptPlatform guidance
Material Design48 × 48 dpPlatform guidance

A practical rule is to treat 44 to 48 CSS pixels as the target for primary actions and 24 as the absolute minimum. Check the current WCAG text for the exact exceptions.

The visible icon can be smaller than the target

A 20px icon is fine if the clickable area around it is larger. Use padding rather than shrinking the hit area.

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
}
.icon-button svg { width: 20px; height: 20px; }

Text links inside a sentence are exempt from the minimum size in WCAG’s inline exception, but lists of links, such as menus, footers and tag lists, are not. Give each item vertical padding.

.footer-links a {
  display: inline-block;
  padding: 12px 8px;
}

Spacing between targets

Even large buttons are hard to hit if they touch. Keep at least 8px of space between adjacent targets, and more between a primary action and a destructive one such as “Delete”. Never place “Submit” and “Cancel” edge to edge.

Show pressed and focus states

button:active { transform: scale(0.98); }
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }

Visible feedback tells users the tap registered and prevents double-taps. Do not remove outlines without providing a clear replacement, because keyboard and switch-device users need them.

Gestures need alternatives

Swipe, long-press and drag actions are hard for some people. Provide a visible button as an alternative. Keep important controls away from the extreme screen edges, where system gestures such as back-swipe and the home indicator can interfere.

Part 2: Mobile forms

Use the right input type

The type attribute selects the on-screen keyboard and enables built-in validation.

FieldMarkup
Emailtype="email"
Phonetype="tel"
Web addresstype="url"
Search boxtype="search"
Datetype="date" (test on target browsers)
Passwordtype="password"

inputmode and numeric fields

Avoid type="number" for things that are not quantities, such as PIN codes, OTPs, card numbers and phone numbers. It adds spinners, accepts “e” and drops leading zeros in some cases. Use text with an inputmode hint instead.

<label for="pin">PIN code</label>
<input id="pin" name="pin" type="text"
       inputmode="numeric" pattern="[0-9]{6}"
       autocomplete="postal-code" maxlength="6">

Use inputmode="decimal" for amounts with a decimal point and inputmode="numeric" for whole numbers. Use enterkeyhint (for example “next”, “done”, “search”, “go”) to label the keyboard’s action key.

autocomplete saves typing

Browsers can fill names, addresses and codes if you tell them what each field is. Use standard autocomplete tokens.

<input name="name"  autocomplete="name">
<input name="email" type="email" autocomplete="email">
<input name="phone" type="tel" autocomplete="tel">
<input name="addr"  autocomplete="street-address">
<input name="otp"   inputmode="numeric" autocomplete="one-time-code">
<input name="pwd"   type="password" autocomplete="current-password">

Use new-password on sign-up forms so password managers offer to generate one. Avoid turning autocomplete off on ordinary fields, since it hurts completion rates and can fail accessibility criteria.

Prevent the zoom-on-focus jump

iOS Safari zooms the page when a user focuses an input whose font size is below 16px. Set inputs to at least 16px instead of disabling zoom in the viewport tag, which harms accessibility.

input, select, textarea { font-size: 16px; }

Labels, not placeholders

Placeholder text vanishes as soon as the user types, has low contrast and is not a reliable accessible name. Always use a visible <label> linked with for and id. Put the label above the field on mobile, which gives the input the full width.

<label for="email">Email address</label>
<input id="email" name="email" type="email" autocomplete="email" required>

Make fields full width and reduce the count

  • One column. Side-by-side fields are hard to tap and read on narrow screens.
  • Ask only for what you need. Every extra field reduces completion. Consider a single “Full name” field rather than splitting first and last name, unless you truly need both.
  • Mark optional fields as optional rather than starring every required one.
  • Use select menus sparingly. For a few choices, radio buttons with large tap areas are quicker.
.form-field { display: block; margin-bottom: 16px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  box-sizing: border-box;
}

Radios and checkboxes with big hit areas

.choice { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.choice input { width: 24px; height: 24px; }
.choice label { flex: 1; padding: 12px 0; } /* label is part of the target */

Part 3: Validation and errors

  • Validate on blur or submit, not on every keystroke. Showing “Invalid email” after one character is annoying.
  • Say what is wrong and how to fix it. “Enter a 6-digit PIN code” beats “Invalid input”.
  • Show the message next to the field, not only at the top of the page. Link it with aria-describedby and set aria-invalid="true" on the field.
  • Do not rely on colour alone. Add an icon or text.
  • Keep the user’s input after an error. Never clear the form.
  • Validate on the server too. Client-side checks are for convenience, not security.
<label for="pin">PIN code</label>
<input id="pin" aria-invalid="true" aria-describedby="pin-err">
<p id="pin-err" role="alert">Enter a 6-digit PIN code.</p>

Part 4: Keyboards and layout

When the on-screen keyboard opens, it covers about half of the screen, sometimes hiding the field or the submit button. Practical fixes:

  • Avoid fixed-position footers that sit on top of inputs. Test with the keyboard open.
  • Use dynamic viewport units (dvh) rather than 100vh for full-height layouts, as explained in the viewport units guide.
  • Where supported, the viewport meta interactive-widget setting can control how the keyboard resizes the layout. Support varies between browsers, so test it rather than assuming.
  • Scroll the focused field into view if needed, and keep the submit button reachable.

Part 5: Submit buttons and feedback

  • Label the button with the action: “Create account”, “Send enquiry”, not “Submit”.
  • Disable the button or show a spinner while the request is in flight, to prevent double submissions, and re-enable it on error.
  • Confirm success clearly, and move focus to the confirmation message.
  • Make the form resilient to flaky mobile connections: handle timeouts and show a retry option rather than losing the data.

Performance and INP

Slow response to taps is measured by Interaction to Next Paint (INP). Heavy validation scripts, large third-party widgets and long tasks on the main thread make taps feel laggy. Keep handlers short, defer non-critical scripts and read Core Web Vitals on Mobile for fixes. Use the browser console to catch errors, as covered in debugging JavaScript console errors on mobile.

Testing checklist

  1. Can you reach every control comfortably with one thumb at 360px width?
  2. Are all repeated links and buttons at least 24px, ideally 44 to 48px, with spacing?
  3. Does each field open the right keyboard?
  4. Does autofill work for name, email, phone, address and OTP?
  5. Does the page avoid zooming when an input is focused?
  6. Are all labels visible and connected to their inputs?
  7. Are error messages specific and next to the field?
  8. Is the submit button reachable with the keyboard open?
  9. Does the form work in landscape and with larger system font sizes?
  10. Does everything work with a screen reader and keyboard?

Test on real devices with Dev Browser

Desktop emulation cannot show how your thumb actually reaches a button or how the keyboard covers a form. Dev Browser loads your page on your own phone at phone, tablet and desktop widths, so you can try the form the way a visitor would. Install it from Google Play and see the Dev Browser guide and the products page.

Common mistakes

  • Placeholder-only fields with no label.
  • Using type="number" for PIN codes and phone numbers.
  • Disabling zoom with user-scalable=no to avoid the focus zoom.
  • Tiny “x” close buttons and tightly packed icon rows.
  • Blocking paste on password or OTP fields.
  • Clearing the form after a validation error.

Frequently asked questions

What is the minimum touch target size?

WCAG 2.2 requires 24 by 24 CSS pixels at Level AA, with exceptions. Platform guidelines recommend 44 to 48 units for comfort.

Should I use type=”number” for phone numbers?

No. Use type="tel" for phones and text with inputmode="numeric" for codes.

Does autocomplete help conversion?

It reduces typing and errors, which generally helps completion. Measure on your own form to confirm.

Why does my page zoom when I tap an input?

iOS Safari zooms when the input font size is under 16px. Raise it to 16px or more.

Conclusion

Make targets big enough and spaced apart, tell the browser what each field is, label everything, validate kindly and test with a real thumb. These changes are small in code and large in effect. Check your forms on a phone with Dev Browser before every release.

Disclaimer: Standards and browser behaviour evolve. Verify current WCAG text and browser support before relying on specific details.

Leave a Reply

Share Your Love