object-alt
Web validation
<object> elements must include short, descriptive alternative text.The HTML <object> element embeds files like PDFs, videos, or other web pages. Because assistive technologies cannot parse the embedded resource itself, they rely on an accessible name that tells people what the object is or does.
You must provide an accessible name using aria-label, aria-labelledby, or title. If the object is purely decorative, remove it from the accessibility tree with role="none" or role="presentation".
Pass Patterns
Using the title attribute
The title attribute provides an accessible name when no visible text label is present.
<object data="../media/Evinced_logo_dark.svg" title="Evinced logo"></object>Using the aria-label attribute
The aria-label attribute provides an inline accessible name when no visible label exists in the page.
<object
data="../media/Evinced_logo_dark.pdf"
type="application/pdf"
aria-label="Evinced logo"></object>Using the aria-labelledby attribute
The aria-labelledby attribute references a visible element and uses its text as the accessible name.
<span id="video-label1">About our company</span>
<object
data="../media/mp4-example-video.mp4"
aria-labelledby="video-label1"></object>Embedded media for presentational purposes
Assigning role="presentation" removes the object from the accessibility tree when it conveys no information.
<object
data="../media/mp4-example-video.mp4"
role="presentation"></object>Fail Patterns
No text alternatives
The object has no text alternative, so assistive technologies cannot announce its purpose.
<object data="../media/Evinced_logo_dark.svg"></object>Using a text node as the only description
Text inside <object> elements does not contribute to the accessible name.
<object data="../media/mp4-example-video.mp4">
About our company
</object>Note: This pattern might not be flagged. However, the HTML accessibility mapping specification doesn't use an <object> element's body text as its accessible name, and assistive technologies generally ignore it, so don't rely on it.
WCAG techniques
Sufficient techniques
- H53: Using the body of the object element (Warning: This technique is wrong. In reality ATs ignore the
<object>element’s body text.)
ACT Rules
Try It Yourself
Using a screen reader
New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers
- Load the page and open a screen reader.
- Navigate to an embedded object.
- Listen to what the screen reader announces.
Expected results: It announces the alternative text you supplied.
Actual results: If no alternative is present, the screen reader either stays silent or states the file name only.
Inspecting the browser dev-tools
- Open the browser’s dev-tools Accessibility pane.
- Select the
<object>element in the DOM.
Expected results: The element shows an Accessible Name that matches the alternative text you provided, or has presentation/none as its role.
Actual results: The Name field is empty.
FAQ
How does this issue relate to 1.1.1 Non-text Content?
SC 1.1.1 requires every non-text element to present the same information in text form. Supplying an accessible name for each <object> satisfies that requirement. Omitting it fails the success criterion.
Why is this issue marked as Serious?
Without alternative text, people who rely on assistive technology miss crucial information or functionality embedded in objects, making content unusable. The barrier is widespread across browsers and assistive technologies, so the impact is high.
Standards and Regulations
| Standard | Success Criterion | Reference |
|---|---|---|
| WCAG 2.2 | 1.1.1 Non-text Content (A) | All non-text content that is presented to the user has a text alternative that serves the equivalent purpose, except for controls/input, time-based media, tests, sensory experiences, CAPTCHA, and decoration/formatting/invisible content. |
| EN 301 549 | 9.1.1.1 Non-text Content | Same as the WCAG text. |
| Section 508 | 1194.22(a) | A text equivalent for every non-text element shall be provided (e.g., via “`alt`”, “`longdesc`”, or in-element content). |