Rampsight

All rules

Text alternatives

iframes need a title

Why it matters

An untitled frame is announced by its URL, or skipped over. Anything embedded — a payment form, a map, a video — becomes an unlabelled hole in the page.

How to fix it

  1. Add a title attribute describing the frame’s content.
  2. For a purely decorative or empty frame, add title="" and aria-hidden="true" instead.
  3. Third-party embeds count: set the title on your side of the markup.

In markup

Fails
<iframe src="/payment"></iframe>
Passes
<iframe src="/payment" title="Payment form"></iframe>

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 frame-title (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.