31 lines
823 B
Plaintext
31 lines
823 B
Plaintext
|
# jsx-a11y/aria-proptypes
|
||
|
|
||
|
💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
|
||
|
|
||
|
<!-- end auto-generated rule header -->
|
||
|
|
||
|
ARIA state and property values must be valid.
|
||
|
|
||
|
## Rule details
|
||
|
|
||
|
This rule takes no arguments.
|
||
|
|
||
|
### Succeed
|
||
|
```jsx
|
||
|
<!-- Good: the aria-hidden state is of type true/false -->
|
||
|
<span aria-hidden="true">foo</span>
|
||
|
```
|
||
|
|
||
|
### Fail
|
||
|
```jsx
|
||
|
<!-- Bad: the aria-hidden state is of type true/false -->
|
||
|
<span aria-hidden="yes">foo</span>
|
||
|
```
|
||
|
|
||
|
## Accessibility guidelines
|
||
|
- [WCAG 4.1.2](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
|
||
|
|
||
|
### Resources
|
||
|
- [ARIA Spec, States and Properties](https://www.w3.org/TR/wai-aria/#states_and_properties)
|
||
|
- [Chrome Audit Rules, AX_ARIA_04](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_aria_04)
|