<object> elements do not have alternate text

How to fix the object-alt accessibility rule. Images and text alternatives.

The message you saw

Lighthouse and PageSpeed Insights
<object> elements do not have alternate text
axe-core, axe DevTools and this checker
<object> elements must have alternative text (rule object-alt)

Lighthouse runs axe-core inside it, so both are the same check, and the fix below works whichever tool showed you the message.

What it means

The <object> element embeds another file into the page: an SVG drawing, a PDF, a video player, an old plug-in. Screen readers can’t always look inside it, so the object itself needs a name that says what it is.

This message means an <object> with a data file has loaded but has no aria-label, aria-labelledby or title, and isn’t marked as decorative. axe only checks objects that actually loaded: if the browser is showing the fallback content inside the <object> tags instead, the check doesn’t apply.

Who is affected

An embedded <object> (a PDF, a Flash-era player, an SVG file) has no text alternative, so screen-reader users don't know what it is.

Screen-reader users reach an unnamed embedded item and can’t tell whether it is a map, a document or an advert, or whether it matters.

How to find it

  1. Run the checker, or search the page source for <object.
  2. Older embed code from map, video and document services sometimes still uses it.

How to fix it

  1. Add aria-label (or a title attribute) that says what the embedded content is: “Floor plan of the ground floor”, “2025 annual report (PDF)”.
  2. If the content is important, also give the same information as normal text or a download link next to it, since not every user can operate what’s inside.
  3. If the object is purely decorative, add role="presentation".
  4. Where possible, use a more specific element: <img> for an SVG picture, <iframe> with a title for a document or player.

Example

Before

<object data="floorplan.svg" type="image/svg+xml"></object>

After

<object data="floorplan.svg" type="image/svg+xml"
        aria-label="Floor plan of the ground floor"></object>

Common mistakes

WCAG success criteria

When this rule fails, the page fails:

Check your fix

Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools. Scan again after your change: when the rule no longer appears under the problems, the fix worked.

An automated pass means this rule found nothing wrong. It doesn’t prove the page is accessible: some of what WCAG asks for needs a person to check, and the report’s manual checklist lists those steps.

Related fix guides

More detail