|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
889 bytes
|
| Line | |
|---|
| 1 | # jsx-a11y/iframe-has-title
|
|---|
| 2 |
|
|---|
| 3 | 💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
|
|---|
| 4 |
|
|---|
| 5 | <!-- end auto-generated rule header -->
|
|---|
| 6 |
|
|---|
| 7 | `<iframe>` elements must have a unique title property to indicate its content to the user.
|
|---|
| 8 |
|
|---|
| 9 | ## Rule details
|
|---|
| 10 |
|
|---|
| 11 | This rule takes no arguments.
|
|---|
| 12 |
|
|---|
| 13 | ### Succeed
|
|---|
| 14 | ```jsx
|
|---|
| 15 | <iframe title="This is a unique title" />
|
|---|
| 16 | <iframe title={uniqueTitle} />
|
|---|
| 17 | ```
|
|---|
| 18 |
|
|---|
| 19 | ### Fail
|
|---|
| 20 | ```jsx
|
|---|
| 21 | <iframe />
|
|---|
| 22 | <iframe {...props} />
|
|---|
| 23 | <iframe title="" />
|
|---|
| 24 | <iframe title={''} />
|
|---|
| 25 | <iframe title={``} />
|
|---|
| 26 | <iframe title={undefined} />
|
|---|
| 27 | <iframe title={false} />
|
|---|
| 28 | <iframe title={true} />
|
|---|
| 29 | <iframe title={42} />
|
|---|
| 30 | ```
|
|---|
| 31 |
|
|---|
| 32 | ## Accessibility guidelines
|
|---|
| 33 | - [WCAG 2.4.1](https://www.w3.org/WAI/WCAG21/Understanding/bypass-blocks)
|
|---|
| 34 | - [WCAG 4.1.2](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
|
|---|
| 35 |
|
|---|
| 36 | ### Resources
|
|---|
| 37 | - [axe-core, frame-title](https://dequeuniversity.com/rules/axe/3.2/frame-title)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.