(instance: TestInstance)
| 208 | |
| 209 | // See: https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State#checked-state |
| 210 | export function computeAriaChecked(instance: TestInstance): AccessibilityState['checked'] { |
| 211 | const { props } = instance; |
| 212 | |
| 213 | if (isHostSwitch(instance)) { |
| 214 | return props.value; |
| 215 | } |
| 216 | |
| 217 | const role = getRole(instance); |
| 218 | if (!rolesSupportingCheckedState[role]) { |
| 219 | return undefined; |
| 220 | } |
| 221 | |
| 222 | return props['aria-checked'] ?? props.accessibilityState?.checked; |
| 223 | } |
| 224 | |
| 225 | // See: https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State#disabled-state |
| 226 | export function computeAriaDisabled(instance: TestInstance): boolean { |
no test coverage detected
searching dependent graphs…