Skip to content
WordPressRule: input-image-alt•Reviewed Oct 2026

Add alt text to image submit buttons in WordPress

Inputs with `type="image"` function as submit buttons and require descriptive `alt` text.

What's wrong

An `<input type="image">` missing `alt` text has no accessible name for screen readers.

Who it affects

Screen reader users cannot identify the button's action and hear only 'Image button, unlabelled'.

How to fix on WordPress

Add `alt="<?php esc_attr_e( 'Submit', 'textdomain' ); ?>"` to image buttons.

Code example

Problematic Code
PHP
<input type="image" src="<?php echo esc_url( $btn_img ); ?>">
Recommended Accessible Code
PHP
<input type="image" src="<?php echo esc_url( $btn_img ); ?>" alt="<?php esc_attr_e( 'Search products', 'textdomain' ); ?>">

How to check your fix

Inspect `<input type="image">` elements and confirm `alt` attribute is non-empty and descriptive.

Check if your site has this issue

Scan any public store page free against WCAG 2.2 AA in 30 seconds.

Your session has ended

Sign in again to carry on. Anything you typed on this page is kept.

Signed in another way? Use another method (opens a new tab)