Closed
Description
const accessibilityState: AccessibilityState =
disabled !== props.accessibilityState?.disabled
? {...props.accessibilityState, disabled, busy: loading}
: {...props.accessibilityState, busy: loading}
This is how we are computing the accessibility state in a component. We see a warning triggered by react-native-a11y/has-valid-accessibility-state
saying the passed value is not an object in the attached screenshot.
When we change the prop value to an empty object {}
the warning seems to go away. Still, changing the accessibilityState
variable value to an empty object, we see the warning again.
const accessibilityState = {}
The expected behavior is that we shouldn't see this warring as the value of accessibilityState
is an object in both snippets.
Metadata
Metadata
Assignees
Labels
No labels