- Priority
- Nice to have Weight 1. Helps agents, rarely decisive on its own.
- Readiness level
- Not a level gate. It counts toward its section score.
- The question
- Can a browser agent tell what each control in the purchase form does?
On this page
In short
A browser agent is an AI that operates a web page the way a person does: it reads the page, fills in fields and clicks buttons. To know what a control does, it reads the control's accessible name, the label a screen reader announces. This check reads the add-to-cart form on sampled product pages and asks whether every control in it has a name. It has weight 1, gates no level and lifts no score cap.
What this check looks at
The purchase form on a product page usually holds:
- the add-to-cart button
- a quantity field
- option controls for variants, such as a size or colour select, or swatch buttons
Browsers give each control an accessible name. The W3C (World Wide Web Consortium) defines how in two documents: the Accessible Name and Description Computation 1.2 and HTML-AAM (HTML Accessibility API Mappings). The name comes from the markup, for example from an aria-label attribute, a label element or the button's own text. ARIA (Accessible Rich Internet Applications) is the set of attributes, such as aria-label, that describe roles, names and states to assistive technology.
These are the typical gaps:
- An icon-only add-to-cart button: an SVG icon with no text and no
aria-label. - A quantity input without a label.
- A size or colour select without a label.
- Swatch buttons that show only a background colour.
The first button below has no name. A screen reader and an agent learn only that it is a button. The second is named "Add to cart", and its icon is hidden from assistive technology:
<button type="submit" class="add-to-cart"><svg viewBox="0 0 24 24"></svg></button>
<button type="submit" class="add-to-cart" aria-label="Add to cart">
<svg viewBox="0 0 24 24" aria-hidden="true"></svg>
</button>
Why it matters for AI agents
OpenAI's Publishers and developers FAQ says that ChatGPT Atlas, OpenAI's browser, uses ARIA tags to interpret page structure and interactive elements. These are the same labels and roles that support screen readers. OpenAI recommends descriptive roles, labels and states on buttons, menus and forms, following WAI-ARIA practices (the W3C guidance on using ARIA).
An agent that meets an unnamed button has to guess from its position or its icon. An unnamed select gives no hint whether it picks a size, a colour or a delivery option. A clear name removes the guess at the step where a mistake costs the most: putting the right product in the cart.
The same names serve people who use screen readers, so one fix helps both.
A pass shows that every control in the form has a name in the server HTML. It does not show that the names are accurate, that the form works, or that an agent will complete a purchase.
How the scanner decides
The check runs on each sampled product page that answered. It reuses those pages and makes no extra request.
First, it finds the add-to-cart control on the page:
- The first button or input whose text, value, name, class, id or
aria-labelsays "add to cart", "add to bag" or "add to basket". WooCommerce'ssingle_add_to_cart_buttonclass, "buy now" and the phrase in German, French, Italian, Spanish and Dutch also count. - If there is none, the submit button of a form whose
actionposts to/cart/add(as Shopify themes do) or containsadd-to-cartoradd_to_cart(as WooCommerce does).
Then it collects every button, input, select and text area in the form around that control. Inputs with type="hidden" and controls marked aria-hidden="true" are left out. When the control sits in no form, only the control itself is read.
For each control, the scanner computes the name the way browsers do from markup. It takes the first of these that is not empty:
- the text of the elements that
aria-labelledbypoints to aria-label- a
labelelement, linked byforandidor wrapped around the control - the control's own content: a button's text (or the
altof an image inside it), thevalueof a submit, button or reset input, or thealtof an image input titleplaceholder
The verdicts:
- Pass: every control in the form has a name on every page where an add-to-cart control was found.
- Warn: the add-to-cart control has a name, but other controls in the form, such as a quantity field or a size select, have none. The report names up to 5 of them.
- Fail: the add-to-cart control itself has no name on at least one page.
- Skip: no product page was sampled, none could be fetched, or none has an add-to-cart control in its server HTML.
The scanner reads only the HTML the server sends. It does not run JavaScript or apply CSS, and it cannot see inside shadow DOM (components that keep their markup apart from the page). A control a script adds later is not seen. When the whole form needs JavaScript, the check is skipped, and the server-rendered content check covers that problem. A control hidden only with CSS still counts. The scanner does not apply default labels a browser may give a button without a value, so give every button an explicit name.
How to fix it
Name the controls in the markup. Keep the visible design as it is.
WordPress and WooCommerce
- WooCommerce's default product templates render the add-to-cart button with the text "Add to cart" and a quantity input with a label. An unnamed control usually comes from a theme override in the child theme's
woocommercefolder or from a variation swatch plugin. - Fix an override in the child theme, so a theme update does not undo it. Add a
labelelement or anaria-labelto the control that has none. - If a swatch plugin renders the colour buttons, look for an option to output the colour name as text or as an
aria-label, or ask its developer to add one.
Shopify
- Shopify themes render the product form, which posts to
/cart/add, in the theme's main product section. Edit it under Online Store, Themes, Edit code. - Icon-only buttons and colour swatches in custom or third-party themes are the usual gaps. Give each swatch an
aria-labelwith the option value, such asaria-label="Colour: Navy", or a visually hidden label. - Test in a duplicate theme first, then publish it.
Any other stack
- Give the add-to-cart button visible text. If it shows only an icon, add an
aria-labeland mark the iconaria-hidden="true". - Link a
labelelement to the quantity input and to every select withforandid. - Build swatches as radio inputs with labels, or as buttons with an
aria-labelthat names the value. - Render the form on the server, so agents that do not run JavaScript also get the names.
A labelled size select and quantity field:
<label for="size">Size</label>
<select id="size" name="size">
<option>Small</option>
<option>Large</option>
</select>
<label for="quantity">Quantity</label>
<input id="quantity" name="quantity" type="number" value="1" min="1" />
Verify it yourself
List the controls in a product page's server HTML:
curl -s https://example.com/products/example | grep -oiE '<(button|input|select|textarea)[^>]*>'
curl -s https://example.com/products/example | grep -oiE '<label[^>]*for="[^"]*"'
Each button, input and select in the add-to-cart form should have an aria-label, an id that a label points to, or text of its own. To see the name a browser computes, open the page in Chrome, right-click the control, choose Inspect and open the Accessibility pane in DevTools. It shows the control's name. If the name is empty there, it is empty for an agent too.
Common mistakes
- Icon-only buttons. An SVG cart icon tells a person what the button does, but it gives the button no name.
- An
aria-labelon the wrong element. A label on the icon or on a wrappingdivdoes not name the button. Put it on the button itself. - A
labelwhosefordoes not match. Theforvalue must equal the control'sid. aria-labelledbypointing to a missing id. The name is then empty, and the scanner falls through to the next source.- Swatches as plain coloured buttons. A background colour is not a name. Add the colour as text or as an
aria-label. aria-hidden="true"on a working control. It removes the control from the accessibility tree, so an agent that reads the tree does not see it at all.
FAQ
What is an accessible name?
It is the label a browser exposes for a control to assistive technology, such as a screen reader. Browsers compute it from the markup: an aria-label, a linked label element, the button's text and a few other sources, in a fixed order.
Do I need aria-label if my button already shows text?
No. Visible text inside a button is its name. Use aria-label only when a control shows no text, such as an icon-only button.
Why does a button labelled "Click here" pass?
The check confirms that a name exists. It does not judge whether the name is clear. Write names that say what the control does, such as "Add to cart" or "Quantity".
Why was this check skipped on my store?
The scanner found no add-to-cart control in the server HTML of the sampled product pages. That usually means a script builds the form. The server-rendered content check looks at that problem.
Does fixing this help customers as well?
Yes. Screen readers announce the same names. A shopper who cannot see the cart icon learns what the button does from the name you add.
The fix in one step
Give every control in the product form a name a screen reader would announce: visible text on the add-to-cart button (or an aria-label when it shows only an icon) and a label element for the quantity field and every option select.
<form action="/cart/add" method="post">
<label for="size">Size</label>
<select id="size" name="size">
<option>Small</option>
<option>Large</option>
</select>
<label for="quantity">Quantity</label>
<input id="quantity" name="quantity" type="number" value="1" min="1" />
<button type="submit" aria-label="Add to cart">
<svg aria-hidden="true"><!-- cart icon --></svg>
</button>
</form>By platform
- WooCommerce
- WooCommerce's default product templates name these controls. An unnamed control usually comes from a theme override in the child theme's woocommerce folder or from a variation swatch plugin, so fix it there.
- Shopify
- The product form lives in the theme's main product section. Icon-only buttons and colour swatches in custom or third-party themes are the usual gaps.
Prompt for a coding agent
On this store's product pages, the add-to-cart form has controls without an accessible name, so browser agents that read the accessibility tree (OpenAI documents this for the ChatGPT agent in Atlas) cannot tell what they do. Open the product page template and find the form that contains the add-to-cart button. Make sure the button has visible text such as "Add to cart", or an aria-label when it shows only an icon. Give the quantity input and every option control (size, colour and other variant selects, radio buttons or swatches) a label element linked with for and id, or an aria-label. Mark decorative icons inside buttons with aria-hidden="true". Keep the visible design unchanged. Verify by fetching a product page with curl and confirming that each button, input and select in the form has text, a value, a label or an aria-label in the server HTML.
Sources and specifications
See how your store does
One scan runs every check in this knowledge base against your site and ends with a prioritised fix list.