How to fix aria input field name on Adobe Commerce (Magento)

Add a meaningful accessible name (label) to every ARIA input field so screen readers can identify and announce it to users.

Steps for Adobe Commerce (Magento)

  1. Locate the PHTML or HTML template responsible for the input field — search under app/design/frontend/<Vendor>/<Theme>/ (custom theme) or vendor/magento/module-*/view/frontend/templates/ (core module).
  2. Override the template by copying it to your custom theme directory under app/design/frontend/<Vendor>/<Theme>/Magento_<ModuleName>/templates/ preserving the path.
  3. In the overridden template file, add <label for="field-id">Descriptive name</label> linked to the input's id, or add aria-label="Descriptive name" directly on the <input> or ARIA-role element.
  4. For UI Component-based forms (e.g., checkout), edit the XML layout file in app/design/frontend/<Vendor>/<Theme>/Magento_Checkout/layout/checkout_index_index.xml and add an 'additionalClasses' or 'label' node, or use a JavaScript mixin to add the aria-label attribute at runtime.
  5. Run bin/magento cache:clean && bin/magento setup:static-content:deploy, then verify with the axe browser extension on the frontend.
Official Adobe Commerce (Magento) documentation ↗
<label for="product-search">Search products</label>
<input id="product-search" type="text" role="searchbox" />

<!-- OR, when a visible label isn't possible: -->
<input type="text" role="searchbox" aria-label="Search products" />

<!-- OR, referencing existing visible text: -->
<h2 id="filter-heading">Filter by price</h2>
<input type="text" role="spinbutton" aria-labelledby="filter-heading" />

What is aria input field name?

Any interactive form field that uses an ARIA role (such as `role="textbox"`, `role="spinbutton"`, `role="searchbox"`, `role="combobox"`, or `role="slider"`) must have an accessible name — a short text label that describes what the field is for. This name can be provided via an HTML `<label>` element, an `aria-label` attribute, or an `aria-labelledby` attribute pointing to visible text on the page. Without it, assistive technologies like screen readers have nothing to announce when a user reaches the field. WCAG Success Criterion 4.1.2 (Name, Role, Value) requires that all user interface components have a name that can be determined programmatically.

Screen reader users — including many people with visual impairments — rely entirely on accessible names to understand what a form field is asking for. An unnamed input field is announced as a blank or generic "edit field," leaving the user completely unable to fill it in correctly, which means lost sales, failed sign-ups, and broken checkout flows on your store. Beyond conversions, failing WCAG 4.1.2 is one of the most commonly cited violations in accessibility lawsuits and regulatory audits (ADA, Section 508, EN 301 549, and the EU Web Accessibility Directive), exposing your business to real legal and financial risk. Fixing it also improves SEO indirectly, since search engines use semantic HTML signals — including proper labeling — to better understand page content and forms.

See the complete Aria input field name guide for every platform and the full background.

Not sure if your Adobe Commerce (Magento) store has this?

Run a free SEOLZ audit — we’ll find aria input field name and every other issue across your whole site.

Scan my site free

Fix aria input field name on another platform