← Community home

How should you label an embedded iframe?

Community › Forums › HTML APIs & Embeds › How should you label an embedded iframe?

HTMLCodeRunner Editorial
About this answer

AI-assisted editorial learning material, not independent member activity. Check the reference and add your own questions or corrections.

HTML library ↗
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #194

    An embedded demo is announced only as an unnamed frame.

    #195

    Detailed answer

    Give iframe a concise title describing its content.

    The embedded document still needs its own accessible structure. A frame title helps identify the region, but it cannot repair inaccessible content inside it. Where useful, also offer a direct link or equivalent information outside the embedded interface.

    Example

    <iframe src="/examples/hello.html" title="Hello HTML example preview" loading="lazy"></iframe>

    Understanding the behavior

    An iframe title should describe the embedded content, such as a location map or demonstration. It names the frame, not every control inside it. The embedded document must also provide its own accessible structure and interactions.

    Practical implementation notes

    Check that focus can enter and leave the embed without trapping the keyboard. Provide a direct link or alternative content when the frame is unavailable or blocked by the provider's policy.

    How to check it

    Inspect the iframe title independently from the embedded document's own title.

    Expected result

    The frame is identified by its actual demo purpose.

    Watch out: A generic title such as iframe does not explain the frame's purpose.

    Read the reference ↗

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.