Ensure IFrame and frame elements contain a non-empty title attribute

Screen reader users rely on frame titles to describe the contents of frames. Lighthouse reports when any<frame> or <iframe> elements do not have a title:

Lighthouse audit showing frame or IFrame doesn't have a title element
Frame or IFrame doesn't have a title element.

How to fix this problem

To fix this problem, provide unique and descriptive title attributes for all frame and iframe elements. Screen reader users rely on a frame title to describe the contents of the frame. Navigating through frames and IFrames can quickly become difficult and confusing for users of this technology if the frames are not marked with a title attribute.

Additionally, best practice is to give the enclosed document a title element with content identical to the title attribute. For example:

<iframe title="My Daily Marathon Tracker" src="https://www.mydailymarathontracker.com/"></iframe>

Learn more in Frames must have title attribute.

Tips for creating descriptive frame titles

  • As previously mentioned, give the enclosed document a title element with content identical to title attribute.
  • Replace placeholder titles such as "untitled frame" with a more appropriate phrase.
  • Make each title unique. Don't duplicate titles, even if they are similar.

Learn more in Write descriptive titles, descriptions, and link text for every page.

More information

Last updated: Improve article