<iframe> elements with negative
tabindex have no interactive elements
This rule tests conformance of the following accessibility requirements:
- 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.
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.
<iframe tabindex="-1" srcdoc="<h1>Hello world</h1>"></iframe>
<iframe tabindex="-1" srcdoc="<a href='/' tabindex='-1'>Home</a>"></iframe>
<iframe tabindex="-1" width="1" height="1" srcdoc="<a href='/'>Home</a>" ></iframe>
<iframe tabindex="-1" srcdoc="<a href='/'>Home</a>"></iframe>
<iframe tabindex="0" srcdoc="<a href='/'>Home</a>"></iframe>
This document includes material copied from or derived from https://act-rules.github.io/rules/akn7bn/. Copyright © 2021 W3C® (MIT, ERCIM, Keio, Beihang).