Skip to content
Learn Measure Blog Case studies About
On this page
  • How this Lighthouse audit fails
  • How to add alternative text to <object> elements
  • Tips for writing effective alt text
  • Resources

<object> elements do not have alt text

May 2, 2019 — Updated Sep 19, 2019
Appears in: Accessibility audits
On this page
  • How this Lighthouse audit fails
  • How to add alternative text to <object> elements
  • Tips for writing effective alt text
  • Resources

Screen readers and other assistive technologies cannot translate non-text content. Adding alternative text to define <object> elements helps assistive technologies convey meaning to users.

How this Lighthouse audit fails #

Lighthouse flags <object> elements that don't have alternative text:

Lighthouse audit showing <object> elements do not have alternative text
The Lighthouse Accessibility score is a weighted average of all the accessibility audits. See the Lighthouse accessibility scoring post for more information.

How to add alternative text to <object> elements #

Describe the object in an ARIA label or the title attribute. In the example below 2019 Web Accessibility Report is the description of the object.

<object type="application/pdf"
data="/report.pdf"
width="600"
height="400"
aria-label="2019 Web Accessibility Report">

</object>

See all valid alt text examples in <object> elements must have alternate text.

The alt attribute and the inner text of the <object> element are not recognized as alt text by Lighthouse.

Tips for writing effective alt text #

  • As previously mentioned, describe the information contained in the embedded object.
  • Alternative text should give the intent, purpose, and meaning of the object.
  • Blind users should get as much information from alternative text as a sighted user gets from the object.
  • Avoid non-specific words like "chart", "image", or "diagram".

Learn more in WebAIM's guide to Alternative Text.

Resources #

  • Source code for <object> elements do not have alt text audit
  • <object> elements must have alternate text (Deque University)
Last updated: Sep 19, 2019 — Improve article
Return to all articles
Share
subscribe

Contribute

  • File a bug
  • View source

Related content

  • developer.chrome.com
  • Chrome updates
  • Web Fundamentals
  • Case studies
  • Podcasts
  • Shows

Connect

  • Twitter
  • YouTube
  • Google Developers
  • Chrome
  • Firebase
  • Google Cloud Platform
  • All products
  • Terms & Privacy
  • Community Guidelines

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies.