Code examples

When an iframe contains content

<iframe title="Coffee maker demonstration" 
        src="coffee-maker-demo.html">
</iframe>

When an iframe does not contain content

  • Add title="Hidden intentionally" so future developers don’t remove aria-hidden="true"
<iframe title="Hidden intentionally"
        aria-hidden="true" 
        src="script-injection.net">
</iframe>