Commit 9a6a5a21 authored by Stepan Khapugin's avatar Stepan Khapugin Committed by Chromium LUCI CQ

[iOS][Getaway] Implement correct voiceover on the authentication screen.

Adds a screen title, makes the blocking screen a modal, and adds a
magic tap to start authentication.

I don't have the final string yet, the bug 1138892 is updated with the
new one that's required.

Bug: 1138892
Change-Id: If6312eb90a1686446f554f8713a1047bdb30256d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2593265Reviewed-by: default avatarRobbie Gibson <rkgibson@google.com>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Auto-Submit: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837552}
parent c418d652
...@@ -29,6 +29,10 @@ const CGFloat kButtonSpacing = 16.0f; ...@@ -29,6 +29,10 @@ const CGFloat kButtonSpacing = 16.0f;
[[UIVisualEffectView alloc] initWithEffect:blurEffect]; [[UIVisualEffectView alloc] initWithEffect:blurEffect];
[self addSubview:blurBackgroundView]; [self addSubview:blurBackgroundView];
blurBackgroundView.translatesAutoresizingMaskIntoConstraints = NO; blurBackgroundView.translatesAutoresizingMaskIntoConstraints = NO;
// TODO(crbug.com/1138892): add localized text.
blurBackgroundView.accessibilityLabel =
@"[Test String] Authenticate to access Incognito content";
blurBackgroundView.isAccessibilityElement = YES;
AddSameConstraints(self, blurBackgroundView); AddSameConstraints(self, blurBackgroundView);
_authenticateButton = _authenticateButton =
...@@ -99,4 +103,16 @@ const CGFloat kButtonSpacing = 16.0f; ...@@ -99,4 +103,16 @@ const CGFloat kButtonSpacing = 16.0f;
return button; return button;
} }
#pragma mark - voiceover
- (BOOL)accessibilityViewIsModal {
return YES;
}
- (BOOL)accessibilityPerformMagicTap {
[self.authenticateButton
sendActionsForControlEvents:UIControlEventTouchUpInside];
return YES;
}
@end @end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment