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

Unified Diff: ios/clean/chrome/browser/ui/toolbar/toolbar_button+factory.mm

Issue 2936773003: [ios clean] Toolbar accessibility and showcase egtests (Closed)
Patch Set: Rename A11y string Created 3 years, 6 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
« no previous file with comments | « ios/clean/chrome/browser/ui/toolbar/BUILD.gn ('k') | ios/showcase/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/clean/chrome/browser/ui/toolbar/toolbar_button+factory.mm
diff --git a/ios/clean/chrome/browser/ui/toolbar/toolbar_button+factory.mm b/ios/clean/chrome/browser/ui/toolbar/toolbar_button+factory.mm
index adfc4ce4f3f39ccbd538b296ffbfed5f6cdbce7b..ba328798b546a7cb8a44965adb11f750c1ccdb2c 100644
--- a/ios/clean/chrome/browser/ui/toolbar/toolbar_button+factory.mm
+++ b/ios/clean/chrome/browser/ui/toolbar/toolbar_button+factory.mm
@@ -4,9 +4,12 @@
#import "ios/clean/chrome/browser/ui/toolbar/toolbar_button+factory.h"
+#include "components/strings/grit/components_strings.h"
#import "ios/chrome/browser/ui/rtl_geometry.h"
#import "ios/chrome/browser/ui/uikit_ui_util.h"
+#include "ios/chrome/grit/ios_strings.h"
#include "ios/chrome/grit/ios_theme_resources.h"
+#include "ui/base/l10n/l10n_util.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -26,6 +29,7 @@
imageForDisabledState:
NativeReversableImage(
IDR_IOS_TOOLBAR_LIGHT_BACK_DISABLED, YES)];
+ backButton.accessibilityLabel = l10n_util::GetNSString(IDS_ACCNAME_BACK);
return backButton;
}
@@ -40,6 +44,8 @@
imageForDisabledState:
NativeReversableImage(
IDR_IOS_TOOLBAR_LIGHT_FORWARD_DISABLED, YES)];
+ forwardButton.accessibilityLabel =
+ l10n_util::GetNSString(IDS_ACCNAME_FORWARD);
return forwardButton;
}
@@ -51,6 +57,8 @@
NativeImage(IDR_IOS_TOOLBAR_LIGHT_OVERVIEW_PRESSED)
imageForDisabledState:
NativeImage(IDR_IOS_TOOLBAR_LIGHT_OVERVIEW_DISABLED)];
+ tabSwitcherStripButton.accessibilityLabel =
+ l10n_util::GetNSString(IDS_IOS_TOOLBAR_SHOW_TABS);
return tabSwitcherStripButton;
}
@@ -60,6 +68,8 @@
[UIImage imageNamed:@"tabswitcher_tab_switcher_button"]
imageForHighlightedState:nil
imageForDisabledState:nil];
+ tabSwitcherGridButton.accessibilityLabel =
+ l10n_util::GetNSString(IDS_IOS_TOOLBAR_SHOW_TAB_GRID);
return tabSwitcherGridButton;
}
@@ -71,6 +81,8 @@
NativeImage(IDR_IOS_TOOLBAR_LIGHT_TOOLS_PRESSED)
imageForDisabledState:nil];
[toolsMenuButton setImageEdgeInsets:UIEdgeInsetsMakeDirected(0, -3, 0, 0)];
+ toolsMenuButton.accessibilityLabel =
+ l10n_util::GetNSString(IDS_IOS_TOOLBAR_SETTINGS);
return toolsMenuButton;
}
@@ -82,6 +94,8 @@
NativeImage(IDR_IOS_TOOLBAR_LIGHT_SHARE_PRESSED)
imageForDisabledState:
NativeImage(IDR_IOS_TOOLBAR_LIGHT_SHARE_DISABLED)];
+ shareButton.accessibilityLabel =
+ l10n_util::GetNSString(IDS_IOS_TOOLS_MENU_SHARE);
return shareButton;
}
@@ -96,6 +110,8 @@
imageForDisabledState:
NativeReversableImage(
IDR_IOS_TOOLBAR_LIGHT_RELOAD_DISABLED, YES)];
+ reloadButton.accessibilityLabel =
+ l10n_util::GetNSString(IDS_IOS_ACCNAME_RELOAD);
return reloadButton;
}
@@ -107,6 +123,7 @@
NativeImage(IDR_IOS_TOOLBAR_LIGHT_STOP_PRESSED)
imageForDisabledState:
NativeImage(IDR_IOS_TOOLBAR_LIGHT_STOP_DISABLED)];
+ stopButton.accessibilityLabel = l10n_util::GetNSString(IDS_IOS_ACCNAME_STOP);
return stopButton;
}
@@ -117,6 +134,7 @@
imageForHighlightedState:
NativeImage(IDR_IOS_TOOLBAR_LIGHT_STAR_PRESSED)
imageForDisabledState:nil];
+ starButton.accessibilityLabel = l10n_util::GetNSString(IDS_TOOLTIP_STAR);
return starButton;
}
« no previous file with comments | « ios/clean/chrome/browser/ui/toolbar/BUILD.gn ('k') | ios/showcase/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698