Skip to main content
🎉 A11y Issue Detection Agent is now live! Detect accessibility issues like a WCAG expert with AI. Try now!
No Result Found
Connect and get help from 7,000+ developers on our Discord community. Ask the CommunityAsk the Community

frame-focusable-content

Severity: Serious

Description

<iframe> and <frame> elements that contain focusable content must not have tabindex="-1" set on them. Setting tabindex="-1" on a frame removes it and all of its child elements from the keyboard focus order. This means keyboard-only users and screen reader users cannot access any interactive content inside the frame, making it inaccessible.

Example

In the following example, the <iframe> contains an interactive form, but tabindex="-1" prevents keyboard users from focusing the frame or any element inside it. This breaks the frame-focusable-content rule.

Incorrect sample - iframe with focusable content and tabindex=-1
Copy icon Copy

In contrast, the following code snippet removes the tabindex="-1" attribute, allowing keyboard users to tab into the frame and interact with its content. This code does not break the frame-focusable-content rule.

Correct sample - iframe without tabindex=-1
Copy icon Copy

How to fix?

Check if your site has <iframe> or <frame> elements that include focusable content (links, buttons, form fields, and so on) and also have tabindex="-1". If so:

  • Remove the tabindex="-1" attribute from the frame element so keyboard users can navigate into it.
  • If you want to prevent users from accessing the frame content, remove the focusable content from inside the frame rather than hiding the frame from the focus order.

Exceptions

  • Frames that contain no focusable content can safely use tabindex="-1" without violating this rule.

Reference

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle