Skip to main content

object-alt

Make sure that <object> elements contain alternative text.

Severity: Serious

Description

The <object> HTML element serves various purposes such as displaying images, embedding browsing contexts, or handling plugins. To ensure accessibility, it is important to provide a text alternative for the <object> element so that screen reader users can understand its content.

This text alternative, known as an accessible name, should accurately describe the contents of the <object>. However, if the <object> element is purely presentational and doesn’t require accessibility, you can use role="none" or role="presentation" to remove it from the accessibility tree.

Why is it important?

Screen readers rely on alternative text to convey the meaning of non-text content to users, as they are unable to directly interpret such content. When it comes to embedded object elements, it is crucial to provide short and descriptive alternative text. This ensures that screen reader users can obtain the information contained within these elements.

The alternative text should accurately convey the intent, purpose, and meaning of the object, allowing assistive technologies to effectively communicate it to users.

How to fix?

Each <object> element can be provided alternative text using one of these methods:

  1. Adding inner text
  2. An aria-labelledby attribute that references elements that are visible to screen readers.
  3. A non-empty title attribute
  4. A non-empty aria-label attribute
  5. Override the role of the element as role=”none” or role=”presentation”

References

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy