Accessibility Insights

Back to Info and Examples for Accessibility Insights for Web

frame-focusable-content

<frame> and <iframe> elements with a negative tabindex (e.g. tabindex="-1") must not have focusable content.

Why it matters

<frame> and <iframe> elements with a negative tabindex are not keyboard focusable. If there are interactive interface components inside them, people who rely on a keyboard (or a keyboard alternate), including those who are blind or have low vision or hand tremors, won't be able to access those components.

How to fix

Remove the negative tabindex attribute from all <frame> and <iframe> elements that contain focusable content.

Example

 

Fail

An <iframe> contains interactive elements. Because the <iframe> has a negative tabindex, keyboard users can't access those elements.
<iframe src="/interactive-form.html" tabindex="-1">

</iframe>
 

Pass

The tabindex="-1" attribute is removed from the <iframe>. All users can access the interactive elements inside the <iframe>.
<iframe src="/interactive-form.html">


</iframe>

About this rule

This rule passes if ANY of the following is true:

  • <frame> and <iframe> elements with a negative tabindex (like tabindex="-1") don't have focusable descendants.
  • <frame> and <iframe> elements with focusable descendants don't have a negative tabindex.

More examples