Rampsight

All rules

Text alternatives

<object> needs a text alternative

Why it matters

Embedded objects are opaque to assistive technology. With no fallback text, whatever the object shows is entirely missing for anyone who cannot see it.

How to fix it

  1. Put the alternative text inside the <object> element as fallback content.
  2. For a chart, summarise the finding, not the shape of the lines.
  3. Prefer <img> or inline <svg> where you can — both are easier to describe.

In markup

Fails
<object data="chart.svg" type="image/svg+xml"></object>
Passes
<object data="chart.svg" type="image/svg+xml">
  Revenue by quarter: Q1 1.2M, Q2 1.5M, Q3 1.4M.
</object>

The requirement behind it

This rule is one way of failing the following WCAG 2.2 success criteria. The W3C, which writes the standard, explains each of them:

Further reading

Deque University on object-alt (opens in new tab)

Deque maintains axe-core, the open-source engine our scanner runs. Their page documents the rule as the engine implements it.

Automated checks find failures a browser can prove. They cannot judge whether a caption is accurate, whether an alt text is useful, or whether a page can be operated end to end with a keyboard — those need a person.