useIframeTitle (HTML)
Summary
Section titled “Summary”- Rule available since:
v2.4.0 - Diagnostic Category:
lint/a11y/useIframeTitle - This rule is recommended, meaning it is enabled by default.
- This rule doesn’t have a fix.
- The default severity of this rule is error.
- Sources:
- Inspired from
jsx-a11y/iframe-has-title - Same as
@html-eslint/require-frame-title
- Inspired from
How to configure
Section titled “How to configure”{ "linter": { "rules": { "a11y": { "useIframeTitle": "error" } } }}Description
Section titled “Description”Enforces the usage of the attribute title for the element iframe.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”<iframe></iframe>code-block.html:1:1 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a title attribute when using iframe elements.
> 1 │ <iframe></iframe>
│ ^^^^^^^^
2 │
ℹ Screen readers rely on the title set on an iframe to describe the content being displayed.
<iframe title=""></iframe>code-block.html:1:1 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a title attribute when using iframe elements.
> 1 │ <iframe title=""></iframe>
│ ^^^^^^^^^^^^^^^^^
2 │
ℹ Screen readers rely on the title set on an iframe to describe the content being displayed.
<iframe title="title"></iframe>Accessibility guidelines
Section titled “Accessibility guidelines”Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.