source: frontend/node_modules/eslint-plugin-jsx-a11y/docs/rules/role-has-required-aria-props.md

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: 926 bytes
Line 
1# jsx-a11y/role-has-required-aria-props
2
3💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
4
5<!-- end auto-generated rule header -->
6
7Elements with ARIA roles must have all required attributes for that role.
8
9## Rule details
10
11This rule takes no arguments.
12
13### Succeed
14```jsx
15<!-- Good: the checkbox role requires the aria-checked state -->
16<span role="checkbox" aria-checked="false" aria-labelledby="foo" tabindex="0"></span>
17```
18
19### Fail
20
21```jsx
22<!-- Bad: the checkbox role requires the aria-checked state -->
23<span role="checkbox" aria-labelledby="foo" tabindex="0"></span>
24```
25
26## Accessibility guidelines
27- [WCAG 4.1.2](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
28
29### Resources
30- [ARIA Spec, Roles](https://www.w3.org/TR/wai-aria/#roles)
31- [Chrome Audit Rules, AX_ARIA_03](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_aria_03)
Note: See TracBrowser for help on using the repository browser.