Skip to main content

"Frames must have an accessible name": how to fix maps and videos with no title

Published · Updated

“Frames must have an accessible name” is the error you’ll see in axe. Lighthouse calls it “<frame> or <iframe> elements do not have a title”, and the Tabwise scan calls it “Embedded content without a title”. They all mean the same thing.

Lots of local businesses paste a Google Map, a YouTube video or a booking widget onto their website. Each one sits in a little window onto another website, called an iframe. If that window has no title, or a vague one, a screen reader can’t say what’s in it. It’s a small accessibility problem with a quick fix.

In our study of Irish local services, one in six websites (16% of 5,794) had an embed with no title. It was the fifth most common problem there.

Who this affects

People who use a screen reader, which is software that reads the page aloud. Blind people and many people with low vision use one.

When the screen reader reaches an untitled embed, it says “frame”. The person has to go inside to find out what it is. It might be your map, a video, or an advert.

A vague title isn’t much better. If three videos on a page all say “YouTube video player”, nobody can tell them apart. A clear title tells people straight away what’s there, so they can use it or skip it.

Why it happens on so many sites

Mostly because of the code you copy and paste:

  • Google Maps. The code you get from Google’s steps for embedding a map has no title at all. Add one.
  • YouTube. The code from Share, then Embed, does include a title, but it’s always “YouTube video player”. One video with that title passes a scanner but describes nothing. Change it to say what the video is.
  • Page-builder widgets. Some map and video widgets in website builders may not add a title. Check with a scan.

Booking widgets, Facebook or Instagram feeds and reviews widgets often use iframes too.

Our figures only count embeds with no title at all. A single video that says “YouTube video player” isn’t in them, so the real picture is worse.

Local businesses use maps and booking widgets far more than most. That’s why the problem is more common among clinics, restaurants and salons. Across Irish websites as a whole, it was 10% of 6,576.

What a good title says

Say what’s in the window, in a few words. Think of it as a label on a door.

  • “Map to our shop on Main Street”
  • “Video: a tour of our guesthouse”
  • “Book an appointment”
  • “Our latest Facebook posts”

If you have two maps or two videos on one page, give each a different title.

How to fix it

How you add a title depends on how the embed got onto your site. If you pasted the code yourself, you add one small piece to it. There’s a before-and-after example in the last section of this page, which you or your web person can copy.

Shopify

Did you paste the embed code into a custom code or Custom Liquid section? Open that section in the theme editor and add the title to the code.

If the map or video comes from a theme section or an app, check its settings for a title field. If there isn’t one, contact the theme or app developer.

WordPress and WooCommerce

If you used a Custom HTML block, edit the code in the block and add the title.

If you used WordPress’s YouTube or Vimeo embed block, run our free scan afterwards to check the video has a title. For map, booking and social feed plugins, look for a title field in the plugin’s settings and fill it in. Then run the free scan again to check it worked. If it didn’t, contact the plugin’s developer.

Wix

If you add code with Wix’s Embed HTML element, add the title to the code you paste. Also fill in the optional “What’s in the embed?” field, which Wix’s guide to embedding a site or widget mentions. Then run our free scan again to check it worked.

If you use Wix’s own Google Maps element, look in its settings for an accessibility or name field and fill it in. Run the free scan again to check.

Squarespace

If you pasted code into an embed block, open the block and choose Code snippet, then Embed Data. Add the title to the code there. Squarespace’s guide to embed blocks shows the steps.

Squarespace’s guide to its map block doesn’t mention a title setting. If our scan flags the map, contact Squarespace support.

If someone else built your site

Copy this and send it to your web person:

Some embedded content on our website (maps, videos, booking or social widgets) has no title, or a generic one like “YouTube video player”. That fails WCAG 2.1 AA (success criterion 4.1.2). Can you give every iframe a short title that says what it is, such as “Map to our shop”? If a widget adds its own iframe, please check its settings or ask the supplier.

How to check it’s fixed

Run our free scan again. It lists any frames that still have no title. It checks your homepage and up to four pages linked from it, and the report lists which ones. If your map is on a page it didn’t check, check that page with the free Lighthouse checker built into Chrome. Run its accessibility check and look at the result for frames having a title.

Our scan flags frames that share the same title, such as two videos both called “YouTube video player”. But it can’t tell whether a single title is any good. So read your titles yourself, and change any that still say “YouTube video player”.

While you’re checking, make sure the links around your map and video say where they go. Our guide to links with no name covers that.

For your web developer

The technique is W3C technique H64, Using the title attribute of the iframe element. axe reports a missing title as frame-title.

Google Maps’ share code has no title. Add one:

<!-- Before: as copied from Google Maps -->
<iframe src="https://www.google.com/maps/embed?pb=…"
        width="600" height="450" style="border:0;"
        allowfullscreen loading="lazy"></iframe>

<!-- After -->
<iframe src="https://www.google.com/maps/embed?pb=…"
        title="Map to our shop on Main Street"
        width="600" height="450" style="border:0;"
        allowfullscreen loading="lazy"></iframe>

YouTube’s share code has a title, but it’s the same on every video. Replace it:

<!-- Before: as copied from YouTube -->
<iframe src="https://www.youtube.com/embed/VIDEO_ID"
        title="YouTube video player"
        width="560" height="315" allowfullscreen></iframe>

<!-- After -->
<iframe src="https://www.youtube.com/embed/VIDEO_ID"
        title="Video: a tour of our guesthouse"
        width="560" height="315" allowfullscreen></iframe>
  • Each iframe on a page needs a unique, descriptive title. axe’s frame-title-unique check flags duplicates.
  • For widgets that inject their own iframe, use the vendor’s title setting if there is one. Otherwise set the title from a script once the iframe loads, and ask the vendor to fix it.
  • Iframes that carry no content, such as tracking frames, should be hidden from assistive technology or removed.

Check your own website for free

We'll scan your homepage and a few key pages and email you a plain-English report in minutes.

Free Report by email in minutes Privacy