Руководства по правилам axe
aria-valid-attrcriticalaxe-core 4.12.1

Fix aria-valid-attr axe errors

An attribute beginning with aria- is misspelled or not defined by ARIA, so browsers and assistive technology may ignore it.

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

Assistive-technology users who rely on correct accessible names, roles, states and properties.

Связь с WCAG

4.1.2 Name, Role, Value (A)

Обнаружение

wcagc compares every aria-* attribute name in the rendered DOM with the attributes supported by axe-core's ARIA model.

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

  • An ARIA attribute is misspelled.
  • A component API invents an aria-* prop that is not part of the specification.
  • A deprecated or framework-specific attribute leaks into the DOM.

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

<button aria-lable="Close">x</button>

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

<button aria-label="Close">x</button>

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

Inspect the accessibility tree and operate the control with assistive technology. Confirm that the corrected attribute produces the intended name, state or relationship.

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

A valid attribute name can still be used on the wrong role or contain an invalid value; those conditions are covered by separate axe rules.

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

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

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

Can invalid ARIA make native HTML worse?

Yes. Incorrect ARIA may hide, rename or distort semantics that a native element would otherwise expose correctly.

How can I prevent this class of error?

Prefer native controls, type-check ARIA props, inspect the rendered DOM and keep automated accessibility checks in CI.

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

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

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

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