Describes the current state of a component to the user of an assistive technology.
NAME | TYPE | REQUIRED |
---|---|---|
disabled |
boolean | No |
selected |
boolean | No |
checked |
boolean or 'mixed' | No |
busy |
boolean | No |
expanded |
boolean | No |
This rule takes no arguments.
<TouchableOpacity accessibilityState={{ disabled: true }} />
<TouchableOpacity accessibilityState={{ checked: true }} />
<TouchableOpacity accessibilityState={{ checked: "mixed" }} />
<TouchableOpacity accessibilityState={{ disabled: true, checked: true }} />
<TouchableOpacity accessibilityState="disabled" />
<TouchableOpacity accessibilityState={["disabled"]} />
<TouchableOpacity accessibilityState={{ disabled: "yes" }} />
<TouchableOpacity accessibilityState={{ checked: "yes" }} />
<TouchableOpacity accessibilityState={{ foo: true }} />
<TouchableOpacity accessibilityState={{ foo: "yes" }} />
Note: This plugin previously defined a rule with this name which is now has-valid-accessibility-states
(see #42). React Native v0.61 introduced a new accessibilityState
prop (see commit) -- which is now covered by this rule.