Commit 07423072 authored by David Jean's avatar David Jean Committed by Commit Bot

[ios] Replace X with Cancel in Navbars

We have a couple of instances when presenting a view controller in isolation,
it shows an X at the top left, but should be saying Cancel:
Bookmarks: Edit Bookmark, Edit Folder, Move Folder
Manual Fallback: Manage Passwords / Credit Cards / Addresses

Bug: 943094
Change-Id: I5c7849ca119966b114fb3e6484ef0f8a4d3a620e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529059Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: David Jean <djean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642436}
parent 881420be
......@@ -226,10 +226,10 @@ const CGFloat kEstimatedTableSectionFooterHeight = 40;
self.navigationItem.hidesBackButton = YES;
UIBarButtonItem* cancelItem =
[ChromeIcon templateBarButtonItemWithImage:[ChromeIcon closeIcon]
target:self
action:@selector(cancel)];
UIBarButtonItem* cancelItem = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self
action:@selector(cancel)];
cancelItem.accessibilityIdentifier = @"Cancel";
self.navigationItem.leftBarButtonItem = cancelItem;
self.cancelItem = cancelItem;
......
......@@ -177,12 +177,10 @@ folderEditorWithBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel
if (self.editingExistingFolder) {
// Add Cancel Button.
UIBarButtonItem* cancelItem =
[ChromeIcon templateBarButtonItemWithImage:[ChromeIcon closeIcon]
target:self
action:@selector(cancel)];
cancelItem.accessibilityLabel =
l10n_util::GetNSString(IDS_IOS_BOOKMARK_NEW_CANCEL_BUTTON_LABEL);
UIBarButtonItem* cancelItem = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self
action:@selector(cancel)];
cancelItem.accessibilityIdentifier = @"Cancel";
self.navigationItem.leftBarButtonItem = cancelItem;
......
......@@ -152,12 +152,10 @@ using bookmarks::BookmarkNode;
self.title = l10n_util::GetNSString(IDS_IOS_BOOKMARK_CHOOSE_GROUP_BUTTON);
if (self.allowsCancel) {
UIBarButtonItem* cancelItem =
[ChromeIcon templateBarButtonItemWithImage:[ChromeIcon closeIcon]
target:self
action:@selector(cancel:)];
cancelItem.accessibilityLabel =
l10n_util::GetNSString(IDS_IOS_BOOKMARK_NEW_CANCEL_BUTTON_LABEL);
UIBarButtonItem* cancelItem = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self
action:@selector(cancel:)];
cancelItem.accessibilityIdentifier = @"Cancel";
self.navigationItem.leftBarButtonItem = cancelItem;
} else {
......
......@@ -313,12 +313,12 @@ initWithRootViewController:(UIViewController*)rootViewController
#pragma mark - Private
// Creates an autoreleased "X" button that closes the settings when tapped.
// Creates an autoreleased "Cancel" button that closes the settings when tapped.
- (UIBarButtonItem*)closeButton {
UIBarButtonItem* closeButton =
[ChromeIcon templateBarButtonItemWithImage:[ChromeIcon closeIcon]
target:self
action:@selector(closeSettings)];
UIBarButtonItem* closeButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self
action:@selector(closeSettings)];
closeButton.accessibilityLabel = l10n_util::GetNSString(IDS_ACCNAME_CLOSE);
return closeButton;
}
......
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