<object> elements must have alternate text

Rule ID: object-alt
Ruleset: axe-core 3.1
User Impact: Serious
WCAG: 1.1.1
You are viewing older version of the axe rule.
Go to the latest version (3.2)

What if your accessibility tools could do more?

Axe can catch a lot of accessibility issues, but what if accessibility tools could do more? Join our beta program for a new tool that takes an exciting new approach to accessibility testing.

Compliance Data & Impact

User Impact

Disabilities Affected

  • Blindness
  • Deafblindness

Requirement(s)

  • WCAG 2.1 (A): MUST
  • WCAG 2.0 (A): MUST
  • Section 508: MUST

WCAG Success Criteria

  • 1.1.1 Non-text Content

Section 508 Guidelines

  • 1194.22 (a) Text equivalent for non-text elements

How to Fix the Problem

Add alternative text to all embedded <object> elements using either inner text, title attributes, aria-label or aria-labelledby.

aria-label Example

<object id="object123" aria-label="Video Clip" param="abc">

alt Text Example

<object id="object123" alt="Video Clip" param="abc">

Why this is Important

Screen readers have no way of translating non-text content into text announced to users. Instead, they read out alternate text. For screen reader users to obtain the information contained in embedded object elements which must contain short, descriptive alternative text.

The object element defines an embedded object within a document. It is used to embed multimedia (audio, video, applets, etcetera.) or another web page into the document. The object element needs a text alternative so that users of screen readers know the contents of the object.

When writing a text alternative, keep in mind that the purpose of the alt text is to relay information to blind users about the image’s contents and purpose - blind users should be able to get as much information from alt text as a sighted user gets from the image. Alt text should give the intent, purpose, and meaning of the image.

When writing alt text, it’s helpful to keep the following questions in mind:

  • Why is the non-text content here?
  • What information is it presenting?
  • What purpose does it fulfill?
  • If I could not use the non-text content, what words would I use to convey the same information or function?

Be sure that all text contained in this attribute is useful. Words like “chart”, “image”, “diagram”, or image file names tend not to be very useful.

Rule Description

All embedded objects must have text alternatives to be read out to screen reader users.

The Algorithm (in simple terms)

Ensures that every object element has a text alternative.

Resources

Other Resources

You may also want to check out these other resources.

Refer to the complete list of axe 3.1 rules.