[role="img"] elements must have an alternative text

Serious

What is the problem?

The role="img" attribute is used to indicate that an element should be treated as an image. However, if this element doesn't have alternative text, screen reader users won't be able to understand the image's content.

Impacted Groups

Blind
Deafblind

Why is this important?

Images often convey important information that is not available in the surrounding text. For screen reader users, this information is inaccessible without alternative text. This can limit their understanding of the content and their ability to participate fully in online activities.

How to solve this issue

To fix this, add alternative text to role="img" elements using either the aria-label, aria-labelledby, or title attributes. By providing alternative text, you ensure that all users, including those who rely on screen readers, can access and understand the visual content of the page.

Rule Information

Rule ID

role-img-alt

Severity

Serious

Manual Review Required

Yes

Rule Group

WCAG 2.0 Level A & AA Rules

Guidelines

  • WCAG 2.1 (A)
  • WCAG 2.0 (A)
  • WCAG 2.2 (A)
  • Section 508
  • Trusted Tester
  • EN 301 549

Customise Guidance

You can customise each accessibility rule in SiteAlly with your own guidance, instructions and even links to your own organisation specific documentation.

Enable your website editors to resolve issues quickly with SiteAlly.

Ready to make your website accessible?

SiteAlly provides automated accessibility monitoring, detailed reports, and step-by-step guidance to help you achieve and maintain compliance.