How to fix input image alt on Adobe Commerce (Magento)

Add a descriptive `alt` attribute to every `<input type="image">` element so screen readers can announce its purpose to visually impaired shoppers.

Steps for Adobe Commerce (Magento)

  1. Locate the relevant `.phtml` template file in your custom theme under `app/design/frontend/<Vendor>/<Theme>/`. Common locations: `Magento_Checkout/templates/`, `Magento_Search/templates/`, or a payment module template.
  2. Search for `type="image"` within those template files.
  3. Add `alt="<?= $escaper->escapeHtmlAttr(__('Submit order')) ?>"` (using Magento's escaper and translation helper) to each matching `<input>` tag.
  4. Run `bin/magento cache:flush` and `bin/magento setup:static-content:deploy` after saving.
  5. Verify on the frontend with the axe browser extension.
Official Adobe Commerce (Magento) documentation ↗

What is input image alt?

An `<input type="image">` is an image used as a clickable button — common examples include a custom "Buy Now" graphic, a PayPal button, a search icon, or a branded "Submit" image on a form. Like a regular `<img>` tag, it requires an `alt` attribute that describes what the button does. When that attribute is missing or empty, a screen reader has no text to read aloud, so it either skips the button entirely or announces something unhelpful like the image file name (e.g. "btn_buynow_92x26.gif"). WCAG Success Criterion 1.1.1 — Non-text Content — requires all non-text interactive elements to have a text alternative.

Roughly 7–8 million Americans use screen readers, and missing `alt` text on a button can make it completely impossible for them to complete a purchase or submit a form — a direct loss of sales. Beyond conversions, this is a legal compliance issue: the ADA (Americans with Disabilities Act) and similar laws worldwide increasingly require websites to meet WCAG 2.1 AA standards, and failing audits can trigger demand letters or lawsuits. Google's crawlers also read `alt` text to understand image context; descriptive text on interactive elements contributes to the overall accessibility and quality signals that influence rankings. Fixing this is typically a one-line code change with an outsized positive impact.

See the complete Input image alt 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 input image alt and every other issue across your whole site.

Scan my site free

Fix input image alt on another platform