Академія
Правило доступності · role-img-alt
Елементи з [role="img"] повинні мати альтернативний текст
СерйознийWCAG 2.1 (A), WCAG 2.0 (A), WCAG 2.2 (A), Section 508, Trusted Tester, EN 301 549, RGAA
Впливає на:BlindDeafblind
Переконайтеся, що елементи з role="img" мають альтернативний текст.
Як виправити
<!-- ❌ Неправильно -->
<div role="img">🌟🌟🌟🌟⭐</div>
<!-- ✅ Правильно -->
<div role="img" aria-label="Рейтинг: 4 з 5 зірок">🌟🌟🌟🌟⭐</div>Ресурси · Зовнішні посилання
- №01A Simple Alt Text Decision Tree (HTML5 Specification)
- №02F65: Failure of Success Criterion 1.1.1 due to omitting the alt attribute or text alternative on img elements, area elements, and input elements of type "image"
- №03H37: Using alt attributes on img elements
- №04H67: Using null alt text and no title attribute on img elements for images that AT should ignore
- №05ARIA10: Using aria-labelledby to provide a text alternative for non-text content
Безкоштовна перевірка
Перевірте свій сайт
Дізнайтеся, чи є це порушення на вашому ресурсі
Безкоштовний аудит