Skip to content

Commit

Permalink
Merge pull request #3603 from mstepanov/timob-11458
Browse files Browse the repository at this point in the history
[TIMOB-11458] iOS: Accessibility: hide TiUIWindow when another window opens on top; send accessibility notification about screen update
  • Loading branch information
vishalduggal committed Jan 7, 2013
2 parents 189daf1 + 3ef33d8 commit d46b411
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions iphone/Classes/TiWindowProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ -(void)windowDidOpen
}
RELEASE_TO_NIL(animatedOver);
}
// Send notification to Accessibility subsystem that the screen has changed. This will refresh accessibility focus
UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil);
}

-(void)windowReady
Expand Down Expand Up @@ -244,6 +246,14 @@ -(void)windowClosed

[self windowDidClose];
[self forgetSelf];

// Make previous window elements accessible again
UIView *rootView = [[TiApp app] controller].view;
if ([TiUtils isIOS5OrGreater]) {
[(UIView *)[[rootView subviews] lastObject] setAccessibilityElementsHidden:NO];
}
// Send notification to Accessibility subsystem that the screen has changed. This will refresh accessibility focus
UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil);
}

-(void)windowWillClose
Expand Down Expand Up @@ -709,6 +719,10 @@ -(void)attachViewToTopLevelWindow
*/
if (![self _isChildOfTab]) {
if (!modalFlag) {
// Hide inactive window elements for accessibility
if ([TiUtils isIOS5OrGreater]) {
[(UIView *)[[rootView subviews] lastObject] setAccessibilityElementsHidden:YES];
}
[rootView addSubview:view_];
}

Expand Down

0 comments on commit d46b411

Please sign in to comment.