Skip to main content
WCAGrules
Quick navigation

Give every iframe a descriptive title

Every iframe needs a title attribute naming what is inside it. Booking calendar. Payment card form. Advertisement. W3C lists H64 as sufficient for 4.1.2 Name, Role, Value in combination with the general technique for exposing name and role. It is separately sufficient for 2.4.1 Bypass Blocks, where the frame is a repeated block somebody can skip, which is why an ad frame titled Advertisement does real work. The title names the frame rather than the content inside it, because its job is helping a person decide whether to go in. Three things get confused with each other here. The title attribute labels the frame for people, the name attribute labels it for scripts and window targeting and is never announced, and the title element inside the framed document names that document. All three should be there, because they do different jobs.

How we find it in an audit

An iframe with no title is one of the most reliable automated checks on the list, so a scanner handles that pass. The human pass is the values, because iframe, widget-container and vendor boilerplate all clear the machine and none of them answers the only question that matters, which is whether to enter this frame or move past it.

How affected users experience it

A checkout page usually carries several frames at once. Payment fields, a chat widget, an embedded video, an ad slot. A screen reader announces each one as it arrives. Titled, that is Payment card form, frame, and the person goes in. Untitled, it is frame, frame, frame, or a URL read aloud character by character, and finding the card number field inside the third anonymous frame is work nobody signed up for.

Passes vs. fails

Passes: each page names itself. Fails: identical, meaningless titles.

Passes

<iframe src="https://pay.example.com/card" name="pay-frame" title="Payment card form"></iframe>

Fails

<iframe src="https://pay.example.com/card"></iframe>

How this gets tested

The W3C publishes test rules that define what a checker looks for here.

Other ways to satisfy this rule

23 guides on this site are filed under 4.1.2 Name, Role, Value. W3C lists this one as sufficient for that rule only alongside G108, so the pair is what passes and neither half does on its own.

This guide is our interpretation of W3C technique H64: Using the title attribute of the iframe 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.

Go somewhere useful

Find tools, resources and your workspace.

29 destinations