Skip to content
WCAG 4.1.2 Name, Role, Value

How to fix: Frames must have a title

Every <iframe> needs a title describing its content so screen-reader users can decide whether to move into it.

The fix

Add a descriptive title attribute to every <iframe>.

Who this affects

Reading down a page in NVDA or JAWS browse mode, the user hears each frame boundary announced along with its title; where there is no title there is nothing to announce, and the embed is an unidentified box in the reading order. JAWS users can open a list of every frame on the page with Insert+F9 and jump between them, and untitled entries make that list worthless, leaving them to enter each frame and read a few lines to work out what it holds. On a page carrying an embedded video, a map and a payment field, that is three anonymous boxes to explore in turn.

Before and after

Fails
<iframe src="https://maps.example.com/embed"></iframe>
Passes
<iframe src="https://maps.example.com/embed" title="Map of our office location"></iframe>

Where this usually comes from

  • Third-party embed code pasted exactly as supplied from a chat widget, ad slot or social embed that ships no title attribute.
  • A tag manager or analytics script injecting tracking iframes at runtime; those given tabindex="-1" are skipped by the rule, and the ones without it are reported.
  • A design-system Embed or VideoPlayer component that accepts a src prop but exposes no title prop, so nothing can be passed down even when the author knows the content.
  • A CMS rich-text field where editors paste raw iframe HTML, leaving the title to whoever did the pasting.
  • A generic value reused across the page, such as title="iframe" or title="embed", which satisfies this rule while the separate frame-title-unique rule reports it and the frames list stays undifferentiated.

Checking it yourself

Run $$('iframe').map(f => f.title) in the DevTools Console and read the array; blanks and repeated strings are the failures. With NVDA running, press the down arrow through the page in browse mode and listen at each embed for a name following the word "frame". In JAWS, Insert+F9 opens the frames list, which shows you exactly the choices a user is given. Note that aria-label and aria-labelledby satisfy the rule too, so a frame with no title attribute is not automatically a failure.

A scanner finds this one automatically. What it cannot judge, and how the score is built, is on how we test.

Related fixes

Check your site for this issue

Scan any page free against WCAG 2.2 AA and get every automatically detected issue with its fix.

Scanning a page needs no account. The checks run on axe-core.

← All fix guides