Skip to content

Alt text should not repeat the text beside it

  • Rule: axe/image-redundant-alt
  • Checks: Alternative text of images should not be repeated as text
  • WCAG: none; a best practice, not a WCAG success criterion
  • Fix class: content: A fix needs authored text.
  • People who use a screen reader or a braille display, most of them blind.
Section titled “A link or button holds an image and text that say the same thing”

Set the image to alt="", so the text alone names the control and is heard once.

<a href="/cart"><img src="cart.svg" alt=""> Cart</a>

An image in a paragraph, list item or table cell has the same text beside it

Section titled “An image in a paragraph, list item or table cell has the same text beside it”

Set alt="" if the image adds nothing to the text. If it shows something the text does not, write the alt for that instead.

Rewording the alt slightly, such as “Cart icon” beside the word “Cart”

Section titled “Rewording the alt slightly, such as “Cart icon” beside the word “Cart””

axe compares the exact text, so the report goes away, but people still hear the same thing twice.

axe-core’s documentation of the rule

CORA’s fix guidance adapts content from accessibility-agents, under the MIT License: see its notice.