Summary

Ensure that inline frames are uniquely titled so that users can decide whether they want to read or interact with the contents, and that frame content remains consumable after resizing or zooming.

Techniques

Example

Example 1 — A basic iframe

The iframe identifies that it contains a quiz in its title attribute. It includes fallback content to reach the file for reading systems that don't support frames.

<iframe
      href="quiz01.xhtml"
      title="Quiz 1"
      class="quiz">
   Your user agent does not support
   inline frames. Please follow <a 
   href="quiz01.xhtml">this link</a> 
   to open Quiz 1.
</iframe>
Example 2 — An invisible iframe

The iframe contains code necessary for the page, so it is visually hidden and a label also identifies that it contains no content.

<iframe
      href="script.xhtml"
      title="empty"
      tabindex="-1"
      height="0"
      width="0"
      class="hidden">
</iframe>

Explanation

Inline frames generally integrate well with assistive technologies, but the following accessibility considerations should always be adhered to when using them:

References