We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 450fd5b commit fcfed40Copy full SHA for fcfed40
src/helpers/accessiblity.ts
@@ -231,9 +231,5 @@ export function isElementCollapsed(
231
element: ReactTestInstance
232
): NonNullable<AccessibilityState['expanded']> {
233
const { accessibilityState, 'aria-expanded': ariaExpanded } = element.props;
234
- return ariaExpanded !== undefined
235
- ? !ariaExpanded
236
- : accessibilityState !== undefined
237
- ? !accessibilityState.expanded
238
- : false;
+ return (ariaExpanded ?? accessibilityState?.expanded) === false;
239
}
0 commit comments