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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java

Issue 2939143002: Update Previews infbar accessibility string (Closed)
Patch Set: static class 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/infobar/PreviewsInfoBar.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java
index a3711c7d10d4407219861bacf4feb1686dcf84fc..c8e36249a0ed3661073d50394152d3e80f8d7d39 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java
@@ -132,6 +132,13 @@ public abstract class InfoBar implements InfoBarView {
return mView;
}
+ /**
+ * Returns the accessibility message from the view to announce when this infobar is first shown.
+ */
+ protected CharSequence getAccessibilityMessage(TextView messageView) {
+ return messageView.getText();
+ }
+
@Override
public CharSequence getAccessibilityText() {
if (mView == null) return "";
@@ -141,7 +148,8 @@ public abstract class InfoBar implements InfoBarView {
if (usesCompactLayout()) return mContext.getString(R.string.bottom_bar_screen_position);
TextView messageView = (TextView) mView.findViewById(R.id.infobar_message);
if (messageView == null) return "";
- return messageView.getText() + mContext.getString(R.string.bottom_bar_screen_position);
+ return getAccessibilityMessage(messageView)
+ + mContext.getString(R.string.bottom_bar_screen_position);
}
@Override
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/infobar/PreviewsInfoBar.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698