Back to Info and Examples for Accessibility Insights for Web
frame-title
A <frame> or <iframe> element must have an accessible name.
Why it matters
A <frame> or <iframe> is used to embed one HTML document within another.
An accessible name is a word or phrase coded in a way that assistive technologies can associate it with a specific user interface object. Assistive technologies can then refer to the object by name, not just by type.
People with good vision can glance at a <frame> or <iframe> element to get a good idea of its content. People who use assistive technologies rely on the frame’s accessible name to determine whether it contains information relevant to their current needs.
How to fix
For each <frame> or <iframe> element, provide an accessible name using ONE of the following methods.
Good
titleattribute
Better
aria-labelattribute
Best
aria-labelledbyattribute
Example
Fail
<iframe> element doesn't have an accessible name.
Assistive technology users won't have any idea what information the frame contains unless they navigate into its content.…
</iframe>
Pass
<iframe> has a title attribute that gives it an accessible name.
Assistive technology users can judge from the name whether the frame is likely to have useful content.…
</iframe>
About this rule
This rule passes if ANY of the following is true:
- Element has a non-empty
aria-labelattribute - Element has an
aria-labelledbyattribute that references elements that are visible to screen readers - Element has a non-empty
titleattribute - Element’s default semantics were overridden with
role="presentation"orrole="none"
Use caution when applying role="presentation" or role="none" to a <frame> or <iframe> element. These roles instruct assistive technologies to disregard the element’s implicit role without hiding its content from users. If a <frame> or <iframe> has inner text, adding a role of presentation or none will cause it to be reported to users as a text string with no semantic context. For more information, see Using ARIA: Use of Role=presentation or Role=none.