(instance: TestInstance)
| 224 | |
| 225 | // See: https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State#disabled-state |
| 226 | export function computeAriaDisabled(instance: TestInstance): boolean { |
| 227 | if (isHostTextInput(instance) && !isEditableTextInput(instance)) { |
| 228 | return true; |
| 229 | } |
| 230 | |
| 231 | const { props } = instance; |
| 232 | |
| 233 | if (isHostText(instance) && props.disabled) { |
| 234 | return true; |
| 235 | } |
| 236 | |
| 237 | return props['aria-disabled'] ?? props.accessibilityState?.disabled ?? false; |
| 238 | } |
| 239 | |
| 240 | // See: https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State#expanded-state |
| 241 | export function computeAriaExpanded({ props }: TestInstance): boolean | undefined { |
no test coverage detected
searching dependent graphs…