Accessible Computing

Accessibility

Accessible ecommerce: five fixes for your online store

Five accessible ecommerce fixes you can check today: alt text, visible focus, form labels, text contrast and checkout errors. See the WCAG 2.2 criteria.

Accessible Computing · · 8 min read

A store that is hard to use with a keyboard, a screen reader or screen magnification is hard to buy from. The shopper found you, wanted the product, and then could not read the price or finish the form.

Accessible ecommerce gets treated as a specialist subject, but most of it is small, specific repairs. This post covers five of them. For each one we explain what goes wrong, who it affects, how to fix it, and which success criterion it maps to in the W3C's WCAG 2.2 standard, the current version of the web accessibility guidelines. The standard has three conformance levels: A, AA and AAA.

You do not need to write code to run these ecommerce accessibility checks. Some of the repairs need a developer or a theme change, and we say so where that applies. A good test of an accessible online store is whether every shopper can get from the product page to the order confirmation.

1. Write alt text that describes the product

What goes wrong

Alt text is the short written description attached to an image. On many stores it is missing, or it is a file name like "IMG_4471", or it is a row of keywords someone added for search. None of those tell a shopper what is in the photo.

Who it affects

Shoppers using screen readers hear the alt text read aloud in place of the image. When it is empty or meaningless, the product photo does not exist for them.

How to fix it

Open a product in your store admin and find the alt text field for each image. Say what the product is, then add the details a shopper would look for: color, material and the angle of the photo. Leave out "image of", because the screen reader already announces that it is an image.

For example: "Navy canvas tote bag with tan leather handles, front view."

Give each variant photo its own description, so the red one says red. Then read your alt text aloud without looking at the screen. If you cannot picture the product from the words, rewrite it.

Purely decorative images, such as a divider line, should have empty alt text so screen readers skip them.

The WCAG 2.2 criterion

This maps to 1.1.1 Non-text Content, Level A. Any content that is not text needs a text alternative that serves the same purpose.

What goes wrong

A focus indicator is the outline that appears around a link, button or field when you reach it with the keyboard. Browsers draw one by default. Many themes remove it because someone thought it looked untidy, or replace it with a change too faint to spot.

Who it affects

People who use a keyboard or a switch device instead of a mouse depend on it. So do people using magnification, who see a small part of the screen at a time and need a clear marker of where they are.

How to fix it

Put the mouse aside. Start on your home page and press Tab again and again, through the menu, a product page, the cart and the checkout. Each press should move a visible outline to the next link or button. If you lose your place, the indicator is missing or too faint, and your shopper will lose their place in the same spot.

This one is a theme fix. Ask your developer or theme provider to restore a visible focus style on every interactive element: menus, buttons, form fields and the cart drawer.

The WCAG 2.2 criteria

2.4.7 Focus Visible, Level AA, requires a visible focus indicator on anything a keyboard can reach. At Level AAA, 2.4.13 Focus Appearance is new in WCAG 2.2 and sets a minimum size and contrast for the indicator. It has to cover at least the area of a 2-pixel outline around the element, with a contrast ratio of at least 3:1 between its focused and unfocused states.

3. Give every form field a visible label

What goes wrong

Placeholder text is the gray hint that sits inside an empty field, such as "Email address". Plenty of stores use it as the only label. It disappears the moment the shopper starts typing, and it is often too pale to read in the first place.

Who it affects

Screen readers do not all treat a placeholder as a label, so a shopper can land on a field and not hear what it is for. People using magnification see one field at a time, without the rest of the form for context. And anyone who looks away mid-form comes back to boxes with no reminder of what each one asked for.

How to fix it

Put a label in plain view above or beside every field. That means checkout, and also site search, the newsletter signup and account pages. If a field needs a particular format, such as a date, keep that instruction visible next to the label instead of inside the field.

Then ask your developer to confirm each label is tied to its field in the code. That connection is what lets assistive technology announce the right label for the right field.

The WCAG 2.2 criteria

3.3.2 Labels or Instructions, Level A, covers the visible label. 1.3.1 Info and Relationships, Level A, covers the connection between label and field in the code.

4. Make text contrast strong enough to read

What goes wrong

Contrast ratio measures how much a text color differs in brightness from the background behind it. The usual failures are light gray text on white, words laid over a photo, and pale sale prices or button labels chosen to match a brand palette.

Who it affects

Shoppers with low vision or color vision differences have the hardest time with faint text. On a phone in bright sunlight, so does everyone else.

How to fix it

Free contrast checkers are easy to find online. You enter the text color and the background color, and the tool returns a ratio. Run your brand colors through one, then check the places that tend to slip: body text, prices, button labels, links and the footer.

The repair is usually a darker color value in your theme settings. If a color is fixed in the theme's code, hand the list to your developer. Text over photos is harder to test because the background keeps changing, and a solid panel behind the words solves that.

The WCAG 2.2 criteria

1.4.3 Contrast (Minimum), Level AA, asks for a ratio of at least 4.5:1 for normal text. 1.4.6 Contrast (Enhanced), Level AAA, raises that to 7:1. Large text has a lower threshold at both levels. Of the WCAG 2.2 ecommerce checks in this post, contrast is the easiest to measure.

5. Write accessible checkout errors that say what went wrong and how to fix it

What goes wrong

The shopper presses "Place order" and gets "Something went wrong." Or a field turns red with no words attached. Or a message appears at the top of the page and never says which field it means.

Who it affects

A screen reader user may never hear that an error happened. A shopper who cannot tell red from the colors around it sees no change at all. Every other shopper is left to guess, at the last step before the sale.

How to fix it

Submit your checkout form empty and read what comes back. Then try a ZIP code with a digit missing and an email address with no @ sign.

A good error message names the field, says what is wrong in words and suggests the correction: "Enter a 5-digit ZIP code." It sits next to the field it refers to. It does not rely on color alone. And the form keeps everything the shopper already typed.

Some of these messages live in your theme, where you can edit them. Others belong to your platform's checkout, where you may not be able to. Write down which is which, change what you can and take the rest to your developer. That list is where an accessible checkout starts.

The WCAG 2.2 criteria

3.3.1 Error Identification, Level A, requires that the error is identified and described to the shopper in text. 3.3.3 Error Suggestion, Level AA, requires a suggested correction when one is known.

Where to go from here

These five fixes are a start on accessible ecommerce, and WCAG 2.2 has many more success criteria. For the full standard, read our guide to understanding WCAG 2.2 at Level AAA.

To see your search gaps, what your email list could be earning and whether AI answer engines mention you, start with the free visibility audit.

All articles