Skip to content

Commit b1ec167

Browse files
committed
make RNSFullWindowOverlay a modal for accessibility
1 parent 4438732 commit b1ec167

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ios/RNSFullWindowOverlay.mm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515

1616
@implementation RNSFullWindowOverlayContainer
1717

18+
- (instancetype)initWithFrame:(CGRect)frame
19+
{
20+
self = [super initWithFrame:frame];
21+
if (self) {
22+
self.accessibilityViewIsModal = YES;
23+
}
24+
return self;
25+
}
26+
1827
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
1928
{
2029
for (UIView *view in [self subviews]) {
@@ -127,6 +136,9 @@ - (void)didMoveToWindow
127136
[_touchHandler detachFromView:_container];
128137
}
129138
} else {
139+
if (_container != nil) {
140+
UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, _container);
141+
}
130142
if (_touchHandler == nil) {
131143
#ifdef RCT_NEW_ARCH_ENABLED
132144
_touchHandler = [RCTSurfaceTouchHandler new];

0 commit comments

Comments
 (0)