Руководства по правилам axe
image-altcriticalaxe-core 4.12.1

Fix image-alt axe errors

An image is missing an alternative-text decision, so a screen reader may lose the information or announce a raw filename.

Кого затрагивает

Blind and screen-reader users, people using text-only browsing, and users whose images fail to load.

Связь с WCAG

1.1.1 Non-text Content (A)

Обнаружение

wcagc reports img elements that do not expose an alternative-text decision through alt text or an accepted presentational pattern.

Почему возникает эта ошибка

  • A CMS image field permits publishing without an alt-text decision.
  • A reusable image component omits the alt prop or treats it as optional.
  • A filename or generic word such as image is used instead of contextual text.

Проблемная разметка

<img src="/product.jpg">

Исправленный код

<img src="/product.jpg" alt="Blue running shoe with white sole">

Проверьте исправление вручную

Read the page without the image. Confirm that informative alt text conveys the image's purpose in this context, while decorative images use alt="" and add no noise.

Границы автоматизации

Automation can detect a missing alt attribute, but it cannot decide whether the wording is accurate, whether the image is decorative, or whether nearby text already provides an equivalent.

Источники и стандарты

Метаданные правила и ссылка Deque генерируются из axe-core 4.12.1. Ссылка W3C ведёт на нормативное руководство WCAG для соответствующего критерия.

Вопросы разработчиков

Can I use empty alt text?

Yes, for a genuinely decorative image. Informative and functional images need text that communicates their purpose in context.

Can automation judge whether alt text is meaningful?

No. A scanner can find structural omissions, but a person must confirm that the alternative is accurate, concise and useful.

Проверьте отрисованную страницу

Одно нарушение редко встречается в одиночку

Запустите проверку страницы в wcagc, чтобы найти это правило, связанные проблемы WCAG, затронутые селекторы и пункты, требующие ручной оценки.

Проверить страницу