Skip to content
easeweb
Search topics

Iframes with a missing or generic title

A studio's contact page embeds an untitled map and a video titled only "Video player", so a screen reader announces two frames but not what they hold.

WCAG 2.2
SC 4.1.2ASC 2.1.1A
Required by
Section 508 · EN 301 549 (EU)
Broken <iframe src="https://maps.example.com/embed?pb=…">
The accessibility problem illustrated: No vision:Video player of what?
01

The problem

Screen reader users can't tell what an embedded map, video or widget holds without going into it, and keyboard users can't reach the controls inside a frame Tab skips

02

Try it

Find the map by what a screen reader says, then reach its Zoom in button with Tab

  • Broken 1: 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 2: this time the names are right. Press Tab to move into the page: focus goes to the video's Play button and never reaches the map's Zoom in button.

  • Apply the fix. The names say what each frame holds, and Tab goes into the map, through Zoom in, Zoom out and View larger map, then on to the video.

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

Name each frame for what it holds, and let Tab into it

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>
What is wrong3 points
  • A screen reader announces the map only as "frame". Its frame has no title, so it has no name.
  • The video is announced as "Video player", which doesn't say which video it is. That name is the host's default: it describes the player, not the video.
  • So neither tells a screen reader user what the frame holds.
After
FixA 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>
How it is fixed3 steps
  1. Give the map's frame a title that says what is in it: "Map of Kiln Room, 4 Mill Lane".
  2. Replace the video's default title with one that says which video it is, "Studio tour video", rather than keeping it beside the new one.
  3. Leave tabindex off both frames. Tab then goes into the map, reaches its buttons and its link, and comes out to the video.

The screen reader now reads "Map of Kiln Room, 4 Mill Lane, frame" and "Studio tour video, frame", so someone who wants directions knows which one to enter, and a keyboard reaches every control in both frames. This fixes both Befores and passes 4.1.2 and 2.1.1. title is the HTML attribute for naming a frame, and browsers and screen readers have read it on frames for longer than any ARIA attribute.

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 });

04

Verify the fix

4 checks, no mouse.

Test with: Screen reader, Keyboard

0 of 4 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 video's captions; for an embedded map whose places are written nowhere else on the page, see maps that are the only way to find a location. 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.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service