We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

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.

HTML
<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.

HTML
<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.

HTML
<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.

HTML
<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.

HTML
<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.

HTML
<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

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

  1. Load the page and open a screen reader.
  2. Navigate to an embedded object.
  3. 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

  1. Open the browser’s dev-tools Accessibility pane.
  2. 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

StandardSuccess CriterionReference
WCAG 2.21.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 5499.1.1.1 Non-text ContentSame as the WCAG text.
Section 5081194.22(a)A text equivalent for every non-text element shall be provided (e.g., via “`alt`”, “`longdesc`”, or in-element content).

Personas impacted by this issue

Learn More