Skip to content
easeweb
Search topics

Iframes with a missing or generic title

A studio's contact page embeds a map with no title and a video whose only title, “Video player”, came with the embed code, so a screen reader announces two frames without saying what either holds.

WCAG 2.2
SC 4.1.2A
Required by
Section 508 · EN 301 549 (EU)
Broken <iframe src="https://maps.example.com/embed?pb=…">
The accessibility problem illustrated: A map and a video. Neither name says what is inside.
01

The problem

Screen reader users can't tell what an embedded map, video or widget holds without going into it to find out.

02

Try it

Find the map, going only by what a screen reader says about each frame.

Under the page is what a screen reader says as it moves from frame to frame. Choose a line to jump to that frame. Can you tell which one is the map before you choose?

Broken Can you fix this?

Visit us

Find us

4 Mill Lane. Open Tuesday to Sunday, 10:00 to 18:00.

Take the tour

Two minutes around the wheels and kilns.

Moving frame by frame, a screen reader says:

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Give each frame a short title that says what is inside it.

  1. 1Every visible frame gets a title, including frames a script inserts.
  2. 2Say what the frame holds, not that it is a frame, a player or an embed.
  3. 3Give each frame its own name, in the language of the page.
Before A map with no title, and a video titled by its host
<h2>Find us</h2><p>4 Mill Lane. Open Tuesday to Sunday, 10:00 to 18:00.</p><iframe src="https://maps.example.com/embed?pb=!1m18!1m12…"  width="600" height="320" style="border:0" loading="lazy"></iframe> <h2>Take the tour</h2><iframe src="https://video.example.com/embed/x7Kq2"  width="560" height="315" title="Video player"  allowfullscreen></iframe>
After A title that says what each frame holds
<h2>Find us</h2><p>4 Mill Lane. Open Tuesday to Sunday, 10:00 to 18:00.</p><iframe src="https://maps.example.com/embed?pb=!1m18!1m12…"  title="Map of Kiln Room, 4 Mill Lane"  width="600" height="320" style="border:0" loading="lazy"></iframe> <h2>Take the tour</h2><iframe src="https://video.example.com/embed/x7Kq2"  title="Studio tour video"  width="560" height="315" allowfullscreen></iframe>

Why this fix: Use native HTML first

Frames from a third-party widget, plugin or SDK
const booking = document.getElementById('booking');const nameFrames = () => {  for (const frame of booking.querySelectorAll('iframe')) {    if (frame.title !== 'Booking calendar') frame.title = 'Booking calendar';  }};nameFrames();new MutationObserver(nameFrames).observe(booking, { childList: true, subtree: true });

Fixing this with an AI coding assistant? Get this guide as Markdown

04

Verify the fix

3 checks, no mouse.

Test with: Screen reader

0 of 3 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat whenever an embed is added or a third-party script changes.

Limits

This is a starting pattern, not a guarantee for every application. The addresses, IDs and names in the snippets are placeholders. Screen readers announce frames differently: some read the frame's name on reaching it, some read the framed document's title instead, and some read neither until you enter, so listen for the names rather than the exact phrasing. This guide covers naming frames, not whether what is inside them is accessible, such as a map's keyboard controls or a video's captions. Test the complete journey with your target assistive technology.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work