Skip to main content

The <object> Element

As defined in the HTML Living Standard, the <object> element can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context, or as an external resource to be processed by a plugin.

Visual Example (with Fallback):

<object data="infographic.svg" type="image/svg+xml"> <img src="infographic.png" alt="Static version of the data chart"> </object> View HTML Living Standard: The object element

Technical Requirements

WCAG Requirement: Non-text Content

Success Criterion 1.1.1 (Level A): All non-text content that is presented to the user has a text alternative that serves the equivalent purpose.

The <object> element is superior to <embed> because it allows for nested fallback content. If the resource cannot be loaded (due to lack of plugin, network error, or browser capability), the content between the opening and closing tags is rendered. This is the perfect place to provide accessible alternatives like descriptive text, data tables, or links to accessible document formats.

Understand SC 1.1.1: Non-text Content

Modern Best Practices

A11y Tip: Naming the Object

For objects that represent meaningful content, always provide an accessible name. While fallback text handles errors, you should also use aria-label or title to identify the resource for screen reader users when it is working correctly.