useIframeTitle
Ce contenu n’est pas encore disponible dans votre langue.
Diagnostic Category: lint/a11y/useIframeTitle
Since: v1.0.0
Sources:
- Same as:
jsx-a11y/iframe-has-title
Enforces the usage of the attribute title
for the element iframe
.
Examples
Section titled ExamplesInvalid
Section titled Invalidcode-block.jsx:1:2 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a title attribute when using iframe elements.
> 1 │ <iframe />
│ ^^^^^^^^^^
2 │
ℹ Screen readers rely on the title set on an iframe to describe the content being displayed.
code-block.jsx: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.
code-block.jsx:1:1 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a title attribute when using iframe elements.
> 1 │ <iframe title="" />
│ ^^^^^^^^^^^^^^^^^^^
2 │
ℹ Screen readers rely on the title set on an iframe to describe the content being displayed.
code-block.jsx:1:1 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a title attribute when using iframe elements.
> 1 │ <iframe title={""} />
│ ^^^^^^^^^^^^^^^^^^^^^
2 │
ℹ Screen readers rely on the title set on an iframe to describe the content being displayed.
code-block.jsx:1:1 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a title attribute when using iframe elements.
> 1 │ <iframe title={undefined} />
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │
ℹ Screen readers rely on the title set on an iframe to describe the content being displayed.
code-block.jsx:1:1 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a title attribute when using iframe elements.
> 1 │ <iframe title={false} />
│ ^^^^^^^^^^^^^^^^^^^^^^^^
2 │
ℹ Screen readers rely on the title set on an iframe to describe the content being displayed.
code-block.jsx:1:1 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a title attribute when using iframe elements.
> 1 │ <iframe title={true} />
│ ^^^^^^^^^^^^^^^^^^^^^^^
2 │
ℹ Screen readers rely on the title set on an iframe to describe the content being displayed.
code-block.jsx:1:1 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a title attribute when using iframe elements.
> 1 │ <iframe title={42} />
│ ^^^^^^^^^^^^^^^^^^^^^
2 │
ℹ Screen readers rely on the title set on an iframe to describe the content being displayed.