SIA-R95<iframe> elements with negative tabindex have no interactive elements

Accessibility requirements

This rule tests conformance of the following accessibility requirements:


This rule checks that <iframe> elements with a negative tabindex attribute contain no interactive elements.


This rule applies to any <iframe> element that has a negative tabindex attribute.


  1. The nested browsing context of the test target does not include elements that are visible and part of the sequential focus navigation. An element is "included" in a nested browsing context if its owner document is the container document of that nested browsing context.


This rule assumes that interactive content inside <iframe> elements is used to provide functionality. If the interactive content does not provide functionality, for example a button that does nothing when clicked, success criterion 2.1.1 may be satisfied, even if the rule is failed.

Accessibility support

There are no major accessibility support issues known for this rule.


By setting the tabindex attribute of an <iframe> element to -1 or some other negative number, it becomes impossible to move the focus into the browsing context of the <iframe> element. Even though its content is still included in the sequential focus navigation, there is no way to move the focus to any of the items in the <iframe> using standard keyboard navigation.



This <iframe> element contains no content that is part of sequential focus navigation:

<iframe tabindex="-1" srcdoc="<h1>Hello world</h1>"></iframe>

This <iframe> element contains a link that, because of its tabindex is not part of sequential focus navigation:

<iframe tabindex="-1" srcdoc="<a href='/' tabindex='-1'>Home</a>"></iframe>

This <iframe> element contains no visible content because of its small size:

    srcdoc="<a href='/'>Home</a>"


This <iframe> element has a link that is part of sequential focus navigation:

<iframe tabindex="-1" srcdoc="<a href='/'>Home</a>"></iframe>


This <iframe> element does not have a tabindex attribute that is a negative number

<iframe tabindex="0" srcdoc="<a href='/'>Home</a>"></iframe>


This document includes material copied from or derived from Copyright © 2021 W3C® (MIT, ERCIM, Keio, Beihang).