Give object elements meaningful fallback content
The object element renders whatever sits between its tags when the embedded thing cannot be shown, so that body is where the text alternative goes. W3C lists H53 as sufficient for 1.1.1 Non-text Content, and for media alternatives when the body holds a link to the alternative rather than the alternative itself. Then it attaches a condition that decides when the technique counts at all. Fallback only reaches a person if the media does not render, so an author can rely on H53 only when they are not relying on the embedded technology's own accessibility. That rules out the modern case people reach for. If your SVG or PDF renders, the fallback never appears, and the accessibility of the SVG or the PDF is what has to carry the rule instead.
How we find it in an audit
An empty object body is the one thing a scanner finds on its own, and it maps exactly onto W3C's single test check. Where there is fallback, we read it, because Your browser cannot display this content is technically an alternative and answers nothing anybody wanted to know.
How affected users experience it
What reaches a person depends on the browser and the content type. Where the object does not render, the body is what they get. Where it does render, they get whatever the embedded thing exposes, which for an untagged PDF or an unlabeled SVG is often nothing. An empty body turns a chart into a hole in the page either way.
Passes vs. fails
Passes
<object data="chart.svg" type="image/svg+xml">
<p>Line chart. Signups grew from 1,200 in January to 4,800 in June.</p>
</object>Fails
<object data="chart.svg" type="image/svg+xml"></object>How this gets tested
The W3C publishes test rules that define what a checker looks for here.
- Element marked as decorative is not exposedA tool can check this
- Image accessible name is descriptiveA tool finds candidates, you decide
- Image button has non-empty accessible nameA tool can check this
- Image has non-empty accessible nameA tool can check this
- Link has non-empty accessible nameA tool can check this
- Object element rendering non-text content has non-empty accessible nameA tool can check this
- SVG element with explicit role has non-empty accessible nameA tool can check this
- Image not in the accessibility tree is decorativeA tool can check this
- Video element visual content has accessible alternativeA tool finds candidates, you decide
- Audio and visuals of video element have transcriptA tool finds candidates, you decide
Other ways to satisfy this rule
39 guides on this site are filed under 1.1.1 Non-text Content. W3C lists this one as sufficient for that rule on its own. Implement it correctly, in a way your readers' software actually supports, and the rule is met.
- ARIA6sufficientName icon-only controls with aria-label
- ARIA9sufficientAssemble one label from several text pieces
- ARIA10sufficientName images and charts with aria-labelledby
- ARIA15sufficientLink complex images to longer descriptions
- C9sufficientPut decorative images in CSS backgrounds
- G68sufficientDescribe the purpose of live-only streams
This guide is our interpretation of W3C technique H53: Using the body of the object element. W3C publishes its techniques as guidance rather than as the standard, and says so on every one of them. The success criterion is what conformance is measured against, and a technique is one documented way to meet it.