Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: ios/web_view/shell/shell_view_controller.m

Issue 2736243003: Add ios_web_view_shell_egtests target and accessibility labels to shell. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/web_view/shell/shell_view_controller.m
diff --git a/ios/web_view/shell/shell_view_controller.m b/ios/web_view/shell/shell_view_controller.m
index 7c2e33e7b76edeb1a907fa19119bce9e3921df61..f29d4cb72e4c8df6d6337ead38f49bd8646bd6a4 100644
--- a/ios/web_view/shell/shell_view_controller.m
+++ b/ios/web_view/shell/shell_view_controller.m
@@ -16,6 +16,9 @@
#endif
// Externed accessibility identifier.
+NSString* const kWebViewShellBackButtonAccessibilityLabel = @"Back";
+NSString* const kWebViewShellForwardButtonAccessibilityLabel = @"Forward";
+NSString* const kWebViewShellAddressFieldAccessibilityLabel = @"Address field";
NSString* const kWebViewShellJavaScriptDialogTextFieldAccessibiltyIdentifier =
@"WebViewShellJavaScriptDialogTextFieldAccessibiltyIdentifier";
@@ -88,6 +91,7 @@ NSString* const kWebViewShellJavaScriptDialogTextFieldAccessibiltyIdentifier =
[_field setKeyboardType:UIKeyboardTypeWebSearch];
[_field setAutocorrectionType:UITextAutocorrectionTypeNo];
[_field setClearButtonMode:UITextFieldViewModeWhileEditing];
+ [_field setAccessibilityLabel:kWebViewShellAddressFieldAccessibilityLabel];
// Set up the toolbar buttons.
// Back.
@@ -101,6 +105,7 @@ NSString* const kWebViewShellJavaScriptDialogTextFieldAccessibiltyIdentifier =
[back addTarget:self
action:@selector(back)
forControlEvents:UIControlEventTouchUpInside];
+ [back setAccessibilityLabel:kWebViewShellBackButtonAccessibilityLabel];
// Forward.
UIButton* forward = [UIButton buttonWithType:UIButtonTypeCustom];
@@ -112,6 +117,7 @@ NSString* const kWebViewShellJavaScriptDialogTextFieldAccessibiltyIdentifier =
[forward addTarget:self
action:@selector(forward)
forControlEvents:UIControlEventTouchUpInside];
+ [forward setAccessibilityLabel:kWebViewShellForwardButtonAccessibilityLabel];
// Stop.
UIButton* stop = [UIButton buttonWithType:UIButtonTypeCustom];

Powered by Google App Engine
This is Rietveld 408576698