Skip to content

iframeTitles

Reports <iframe> elements without a title prop.

✅ This rule is included in the jsx logical preset.

The title attribute on <iframe> elements provides a label that describes the iframe’s content to screen reader users. Without it, users may have difficulty understanding the purpose of the iframe.

This is required for WCAG 2.4.1 and 4.1.2 compliance.

<iframe />
<iframe src="https://example.com" />
<iframe title="" />
<iframe title={undefined} />

If you’re not using iframes in your application, or your iframes are implicitly handled by a framework, you can disable this rule.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.