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

Fix link-name axe errors

A link has no accessible name, leaving its destination or purpose unclear to assistive-technology users.

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

Screen-reader users, keyboard users, speech-input users, and people navigating through a list of links.

Связь с WCAG

2.4.4 Link Purpose (In Context) (A); 4.1.2 Name, Role, Value (A)

Обнаружение

wcagc reports links whose browser-computed accessible name is empty.

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

  • An icon or CSS background is the only link content.
  • An image inside the link has empty alt text and no other name.
  • aria-labelledby points to an element that is empty or absent.

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

<a href="/pricing"><svg aria-hidden="true">...</svg></a>

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

<a href="/pricing"><span class="sr-only">View pricing</span><svg aria-hidden="true">...</svg></a>

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

Use a screen reader's links list and review repeated links out of surrounding prose. Each name should distinguish its destination without relying on an adjacent visual icon alone.

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

A non-empty name can still be vague or misleading. Automation cannot decide whether repeated Learn more links make sense in their surrounding context.

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

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

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

Is Click here acceptable link text?

It may have context, but it is usually weak when links are listed separately. Prefer text that identifies the destination or action.

Can visually hidden text name an icon link?

Yes. A short visually hidden label is often clearer and more translation-friendly than relying only on aria-label.

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

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

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

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