Skip to content

This page is also available for the United States, with prices in USD.

See prices for the United States

This page is also available for the United Kingdom, with prices in GBP.

See prices for the United Kingdom

This page is also available for Australia, with prices in AUD.

See prices for Australia

Bu sayfanın Türkçesi var; fiyatlar Türk lirasıyla.

Türkçe sayfaya geçin
Country and language: Canada, CA · CAD. Change

We work with stores in the United States, the United Kingdom, Canada, Australia and Turkey.

Book now

The checkout form: fields, labels, autofill, error messages and the right keyboard

Checkout form best practices from WCAG 2.2, web.dev and a CHI study: fewer fields, visible labels, autofill, clear errors and the right phone keyboard.

By LeakySalesPublished 8 min read

Topics: Cart & checkout, Accessibility, Mobile shopping

A phone showing a checkout form where two fields have no visible label, the phone field opens a letter keyboard and the only error message sits at the top of the page.
In this article

The checkout form is the point where someone who has already decided to buy has to type their name, address, phone number and card details, sometimes on a phone held in one hand. How the form is built decides how much typing that takes and how easily a mistake can be fixed. This guide covers what published standards and research say about checkout forms, and how to check your own.

What goes wrong in checkout forms

Most problems in a checkout form are small on their own. A field with grey hint text inside it but no label above it. A phone field that opens a full letter keyboard. A form that says "Please correct the errors" at the top but does not say which field is wrong. A billing address the shopper has to type again although it is the same as the shipping address. An address lookup by postal code that does not find a new building.

Each adds a little friction at the last step before payment. Some make the form hard to finish for people who use a screen reader or have trouble with small hand movements.

Why it matters

A controlled study of form guidelines

A peer-reviewed paper presented at CHI 2014, the ACM conference on human factors in computing systems, tested 20 published form guidelines together. Mirjam Seckler and colleagues at the University of Basel, with a Google researcher, took three real registration forms from news websites and built an improved version of each by applying the guidelines. They then had 65 participants fill in either the original or the improved forms in an eye-tracking lab.

With the improved forms, participants needed fewer attempts to submit. On one of the forms, 10 of 32 participants submitted the original version successfully on the first try, against 24 of 33 with the improved version. For two of the three forms, the measured average completion time was shorter: from 113 to 85 seconds on one, and from 105 to 70 seconds on another. For the third form the difference was not statistically significant. On two of the forms, eye tracking also showed fewer fixations before the first submission.

In the interviews, the problems people raised most often about the original forms were format rules they only learned after an error, and not being able to tell required fields from optional ones. These were registration forms rather than checkouts, but the guidelines themselves are about forms in general: labels, field order, formats and error messages.

What the accessibility standard requires

WCAG 2.2, the W3C's web accessibility standard, has several success criteria that apply directly to a checkout form:

  • 3.3.2 Labels or Instructions (level A) requires a label or instruction wherever the page asks for input. The W3C's explanation adds that when a format has specific rules, such as a date pattern, the expected format should be stated.
  • 3.3.1 Error Identification (level A) requires that when an input error is detected automatically, the field in error is identified and the error is described in text. Colour or an icon can be added, but they cannot replace the text.
  • 3.3.3 Error Suggestion (level AA) requires a suggestion for fixing the error when the site knows what the correction would be.
  • 1.3.5 Identify Input Purpose (level AA) requires that software can tell what each personal-information field is for. In HTML this is done with the autocomplete attribute. The W3C notes that this helps people with memory or attention difficulties, because the browser can fill in details they would otherwise have to recall, and people with motor impairments, because it means less typing.
  • 3.3.7 Redundant Entry (level A), new in WCAG 2.2, requires that information already given in the same process is filled in again or offered for selection. The W3C's own examples include an online store that lets the shopper confirm that the billing address is the same as the shipping address, and a checkout that keeps the card number after a payment error instead of clearing it.

What usability specialists have observed

Nielsen Norman Group, a user experience research firm, has written about placeholder text used in place of labels. The hint disappears as soon as someone starts typing, so people who are interrupted can forget what the field wanted. Without visible labels, it is also harder to review the form before submitting and to notice when the browser's autofill has put something in the wrong place. NN/g adds that its eye-tracking work shows attention going to empty fields, so a field that already shows grey hint text can be passed over.

In its form recommendations, NN/g advises fewer fields, labels placed above the fields, a single column, input requirements stated before the shopper fails them, and keeping what the person typed when an error appears. On error messages, it recommends checking a field once the person has finished with it rather than while they are still typing, and placing the message next to the field.

What a good checkout form looks like

It asks only for what you need

Google's web.dev guide to payment and address forms starts with this: ask only for data you will use. It recommends a single field for the full name unless you have a clear reason to store parts separately, and no separate title field. It also suggests being careful with "Address line 2", which some people find confusing, and thinking twice about address lookup by postal code: it does not work the same in every country, long result lists are hard to use on a phone, and the browser's autofill is often faster.

If a field is optional, say so in the label. If you require a phone number, say next to the field what it will be used for.

Every field has a visible label

Put a short label above each field and keep it there while the shopper types. Hint text inside the field can show an example, but it should not be the only place where the field is named. web.dev recommends marking required fields with an asterisk in the label and explaining the asterisk at the top of the form.

The browser can fill it in

Give each field the autocomplete value that matches it. Common ones in a checkout are name, email, tel, street-address (or address-line1 and address-line2), postal-code, country-name, cc-name, cc-number, cc-exp and cc-csc. MDN's reference explains that adding shipping or billing in front, as in shipping postal-code, lets the browser fill both addresses correctly in the same form.

MDN also advises against autocomplete="off" on fields like these. Many people, including those with cognitive or motor impairments, rely on autofill, and turning it off takes that away. web.dev also recommends keeping the name and id of each field stable between page loads and from one release to the next.

The right keyboard opens on a phone

On a phone, the field decides which keyboard appears. Use type="email" for email and type="tel" for the phone number, which opens a number pad. For the card number, web.dev recommends a text field with inputmode="numeric" rather than type="number", which adds arrows for counting up and down. MDN notes that inputmode only changes the keyboard and does not check the value, so validation still has to happen separately.

Use a number keypad for the postal code only if, in your country, it is made of digits alone. Where it contains letters, a number pad gets in the shopper's way.

Errors say what is wrong and where

A good error message sits next to the field, says in plain words what is wrong and how to fix it, and uses text as well as colour and an icon. It appears when the shopper has finished with the field or pressed the button, not while they are still typing. Fields that were filled in correctly stay filled in.

The sources differ slightly on timing. The guidelines tested in the CHI study recommended showing all errors after the form is sent, embedded in the form. NN/g and web.dev recommend checking each field as the person completes it. Both agree on the rest: the message is next to the field, it is specific, and nothing the shopper typed is lost. A summary at the top can help on a long form, but NN/g notes that it does not replace the message at the field.

web.dev adds three details for payment forms. Accept card numbers with spaces and remove the spaces yourself. Do not disable the submit button because something is invalid; explain the problem instead. Check everything on the server as well, because checks in the browser can be skipped.

Nothing is asked twice

Treat the shipping address as the billing address by default and show billing fields only when the shopper says they are different. web.dev recommends making checkout without an account the default and offering an account after the order, filled in from the order details. It also suggests button text that says what comes next, such as "Continue to payment", rather than a bare "Continue".

How to check your own checkout form

You can do most of this on your own phone. Add a product to your cart, go to checkout and stop before the final payment button.

If your checkout is provided by your platform, some of this is fixed, but some fields can usually be changed in the settings. On Shopify, for example, the checkout settings let you hide the company name, address line 2 and the shipping phone number, or make them optional; the postal code and city fields cannot be changed there.

How we look at it

When we look at a store, we go through it as a shopper would, on a phone and on a computer, as far as the first checkout screen. We do not type into the form or place an order. We look at what the form asks for, how the fields are labelled, whether optional fields are marked, and how the form is set up for phones. You can see the other things we check in the cart and checkout section and how a review works on the how we work page.

If you would like us to look at your store this way, you can request a report.

Request an audit

Sources

  1. Seckler, M., Heinz, S., Bargas-Avila, J. A., Opwis, K. and Tuch, A. N. Designing Usable Web Forms: Empirical Evaluation of Web Form Improvement Guidelines. CHI 2014. Author copy (PDF)research.google.com
  2. W3C. Understanding SC 3.3.2: Labels or Instructions. w3.orgw3.org
  3. W3C. Understanding SC 3.3.1: Error Identification. w3.orgw3.org
  4. W3C. Understanding SC 3.3.3: Error Suggestion. w3.orgw3.org
  5. W3C. Understanding SC 1.3.5: Identify Input Purpose. w3.orgw3.org
  6. W3C. Understanding SC 3.3.7: Redundant Entry. w3.orgw3.org
  7. Sam Dutton. Payment and address form best practices. web.dev. web.devweb.dev
  8. MDN Web Docs. HTML attribute: autocomplete. developer.mozilla.orgdeveloper.mozilla.org
  9. MDN Web Docs. inputmode. developer.mozilla.orgdeveloper.mozilla.org
  10. Katie Sherwin. Placeholders in Form Fields Are Harmful. Nielsen Norman Group. nngroup.comnngroup.com
  11. Kathryn Whitenton. Website Forms Usability: Top 10 Recommendations. Nielsen Norman Group. nngroup.comnngroup.com
  12. Rachel Krause. 10 Design Guidelines for Reporting Errors in Forms. Nielsen Norman Group. nngroup.comnngroup.com
  13. Shopify Help Center. Editing the checkout form options. help.shopify.comhelp.shopify.com

Related topic

Cart and checkout

Are the product, price and total shown clearly and correctly in the cart?

More on this topic

All articles