|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.0 KB
|
| Line | |
|---|
| 1 | # jsx-a11y/aria-unsupported-elements
|
|---|
| 2 |
|
|---|
| 3 | 💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
|
|---|
| 4 |
|
|---|
| 5 | <!-- end auto-generated rule header -->
|
|---|
| 6 |
|
|---|
| 7 | Certain reserved DOM elements do not support ARIA roles, states and properties. This is often because they are not visible, for example `meta`, `html`, `script`, `style`. This rule enforces that these DOM elements do not contain the `role` and/or `aria-*` props.
|
|---|
| 8 |
|
|---|
| 9 | ## Rule details
|
|---|
| 10 |
|
|---|
| 11 | This rule takes no arguments.
|
|---|
| 12 |
|
|---|
| 13 | ### Succeed
|
|---|
| 14 | ```jsx
|
|---|
| 15 | <!-- Good: the meta element should not be given any ARIA attributes -->
|
|---|
| 16 | <meta charset="UTF-8" />
|
|---|
| 17 | ```
|
|---|
| 18 |
|
|---|
| 19 | ### Fail
|
|---|
| 20 | ```jsx
|
|---|
| 21 | <!-- Bad: the meta element should not be given any ARIA attributes -->
|
|---|
| 22 | <meta charset="UTF-8" aria-hidden="false" />
|
|---|
| 23 | ```
|
|---|
| 24 |
|
|---|
| 25 | ## Accessibility guidelines
|
|---|
| 26 | - [WCAG 4.1.2](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
|
|---|
| 27 |
|
|---|
| 28 | ### Resources
|
|---|
| 29 | - [Chrome Audit Rules, AX_ARIA_12](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_aria_12)
|
|---|
| 30 | - [DPUB-ARIA roles](https://www.w3.org/TR/dpub-aria-1.0/)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.