Iframe with interactive elements is not excluded from tab-order
| Field | Value |
|---|---|
| Rule code | Iframe_Tabindex_Invalid |
| WCAG conformance level | A |
| WCAG success criterion | 2.1.1 Keyboard |
| Must be fixed at source | No |
Description
We detected an iframe HTML element that contained interactive elements within the frame but was excluded from the document tab order. Iframe elements which contain an interactive (tabbable) element should not be excluded from sequential focus navigation.
How to fix
Each <iframe> element containing interactive elements should not have a negative tabindex, as this can prevent users from accessing important functionalities. For example, if an iframe includes links or buttons, it should be navigable using keyboard input.
Example of a properly configured iframe:
<iframe width='560' height='315' src='https://www.youtube.com/embed/example123' title='YouTube video player for example123' allowfullscreen></iframe>