<object> elements do not have alternate text
How to fix the object-alt accessibility rule. Images and text alternatives.
The message you saw
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
- Run the checker, or search the page source for
<object. - Older embed code from map, video and document services sometimes still uses it.
How to fix it
- Add
aria-label(or atitleattribute) that says what the embedded content is: “Floor plan of the ground floor”, “2025 annual report (PDF)”. - 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.
- If the object is purely decorative, add
role="presentation". - Where possible, use a more specific element:
<img>for an SVG picture,<iframe>with atitlefor 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
- Text between
<object>and</object>is fallback content shown only when the object fails to load. It doesn’t name a loaded object.
WCAG success criteria
When this rule fails, the page fails:
- 1.1.1 Non-text Content (Level A, WCAG 2.0, 2.1, 2.2)
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
- Image elements do not have
[alt]attributes - Frames must have an accessible name
[role="img"]and[role="image"]elements must have alternative text
More detail
- Deque University’s reference for object-alt (the makers of axe-core, the engine our scanner uses)
- W3C’s Understanding 1.1.1
- All fix guides