How to fix aria command name on Adobe Commerce (Magento)
Give every button, link, and menuitem a clear, accessible name so screen readers can announce what it does.
Steps for Adobe Commerce (Magento)
- SSH into your server or open your code editor and navigate to your active theme directory: `app/design/frontend/<Vendor>/<theme>/`.
- Identify the PHTML or XML layout file responsible for the flagged element — common locations: `Magento_Theme/templates/html/header.phtml`, `Magento_Checkout/templates/cart/minicart.phtml`, or `Magento_Theme/templates/html/topmenu.phtml`.
- Open the file and find the `<button>`, `<a>`, or element with an ARIA role that has no accessible text.
- Add `aria-label="<?= $escaper->escapeHtmlAttr(__('Descriptive action name')) ?>"` to the element (always use the escaper and translation helper for Magento templates).
- Alternatively, add a `<span class="sr-only">` (define the utility class in your theme's CSS) inside the element.
- Run `bin/magento cache:clean` and `bin/magento setup:static-content:deploy`, then re-test with axe.
What is aria command name?
The `aria-command-name` rule flags interactive elements — specifically buttons (`role="button"`), links (`role="link"`), and menuitems (`role="menuitem"`) — that have no accessible name. An "accessible name" is the text a screen reader reads aloud when a user lands on that element. It can come from visible text inside the element, an `aria-label` attribute, an `aria-labelledby` attribute pointing to another element's text, or (for images used as buttons) a meaningful `alt` attribute. When none of those exist, the screen reader either reads nothing at all or reads something meaningless like the raw URL or a string of punctuation, leaving visually impaired shoppers completely in the dark about what the control does.
WCAG 2.1 Success Criterion 4.1.2 (Name, Role, Value) is a Level AA requirement, meaning it is referenced in most accessibility laws worldwide — including the ADA (US), EN 301 549 (EU), AODA (Canada), and EAA (UK/Europe). Failing it exposes your store to legal complaints and demand letters that are increasingly common against ecommerce sites. Beyond legal risk, blind and low-vision shoppers using screen readers simply cannot use controls without accessible names — they cannot add items to a cart, navigate menus, or complete a purchase — directly costing you revenue and customers. Additionally, Google uses accessibility signals as one of many quality indicators, so a more accessible site can support better crawlability and user experience scores.
See the complete Aria command name guide for every platform and the full background.
Not sure if your Adobe Commerce (Magento) store has this?
Run a free SEOLZ scan — we’ll find aria command name and every other issue across your whole site.
Scan my site free