Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBar.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBar.java |
index 5c57008960c38f305e6eb1ea6591130cfe3ff2e7..5fa4cf5ce79efec2c823a8c443a00d4c22a80200 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBar.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBar.java |
@@ -89,12 +89,20 @@ public class AppBannerInfoBar extends ConfirmInfoBar implements View.OnClickList |
layout.setCustomViewInButtonRow(playLogo); |
ratingView.setRating(mAppData.rating()); |
+ ratingView.setContentDescription(context.getString( |
+ R.string.app_banner_view_native_app_rating_accessibility, mAppData.rating())); |
+ |
layout.getPrimaryButton().setButtonColor(getContext().getResources().getColor( |
R.color.app_banner_install_button_bg)); |
layout.setContentDescription(context.getString( |
R.string.app_banner_view_native_app_accessibility, mAppTitle, |
mAppData.rating())); |
mTitleView.removeView(webAppUrl); |
+ |
+ if (mIconView != null) { |
+ mIconView.setContentDescription(context.getString( |
newt (away)
2015/02/13 23:49:58
Don't use a content description for the icon. It's
gone
2015/02/13 23:52:09
It's not noise if you can click on it. Clicking
newt (away)
2015/02/14 00:00:18
The user can also click on the TextView. How about
|
+ R.string.app_banner_view_native_app_icon_accessibility, mAppTitle)); |
+ } |
} else { |
// Web app. |
webAppUrl.setText(mAppUrl); |
@@ -102,6 +110,11 @@ public class AppBannerInfoBar extends ConfirmInfoBar implements View.OnClickList |
R.string.app_banner_view_web_app_accessibility, mAppTitle, |
mAppUrl)); |
mTitleView.removeView(ratingView); |
+ |
+ if (mIconView != null) { |
+ mIconView.setContentDescription(context.getString( |
+ R.string.app_banner_view_web_app_icon_accessibility, mAppTitle)); |
+ } |
} |
// Set up clicking on the controls to bring up the app details. |
@@ -132,8 +145,16 @@ public class AppBannerInfoBar extends ConfirmInfoBar implements View.OnClickList |
boolean enabled = true; |
if (mInstallState == INSTALL_STATE_NOT_INSTALLED) { |
text = mAppData.installButtonText(); |
- accessibilityText = |
- getContext().getString(R.string.app_banner_install_accessibility, text); |
+ |
+ if (mAppData != null) { |
+ accessibilityText = |
newt (away)
2015/02/13 23:49:58
funky wrapping. I'd make this two lines
gone
2015/02/13 23:57:13
Done.
|
+ getContext().getString( |
+ R.string.app_banner_view_native_app_install_accessibility, text); |
+ } else { |
+ accessibilityText = |
+ getContext().getString( |
+ R.string.app_banner_view_web_app_install_accessibility, text); |
+ } |
} else if (mInstallState == INSTALL_STATE_INSTALLING) { |
text = getContext().getString(R.string.app_banner_installing); |
enabled = false; |