Skip to content

Commit ab800ab

Browse files
committed
fix(ui): fix iOS bottom-sheet accessibility for Maestro E2E tests
Set accessible={false} on BottomSheetModal on iOS. Since v4.6.0, @gorhom/bottom-sheet defaults accessible={true} which groups all children into one accessibility element, hiding them from XCUITest (and Maestro). See github.com/mobile-dev-inc/Maestro/issues/1493
1 parent acdf0a0 commit ab800ab

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/ui/src/components/sheet/sheet.native.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { RefObject, useEffect, useState } from 'react';
2-
import { BackHandler } from 'react-native';
2+
import { BackHandler, Platform } from 'react-native';
33

44
import BottomSheet, {
55
BottomSheetModal,
@@ -63,6 +63,7 @@ export function Sheet({
6363

6464
return (
6565
<BottomSheetModal
66+
accessible={Platform.OS === 'ios' ? false : undefined}
6667
onChange={handleChange}
6768
backdropComponent={SheetNativeBackdrop}
6869
backgroundStyle={[styles.background, backgroundStyle]}

0 commit comments

Comments
 (0)