diff --git a/mobile/android/base/BrowserToolbar.java b/mobile/android/base/BrowserToolbar.java index 7219bc3b62a0..3dc35c0465fa 100644 --- a/mobile/android/base/BrowserToolbar.java +++ b/mobile/android/base/BrowserToolbar.java @@ -246,6 +246,7 @@ public class BrowserToolbar { mTabsCount.setVisibility(View.VISIBLE); // Set image to more tabs dropdown "v" mTabs.setImageLevel(count); + mTabs.setContentDescription(mContext.getString(R.string.num_tabs, count)); } mHandler.postDelayed(new Runnable() { @@ -263,6 +264,7 @@ public class BrowserToolbar { // Set image to new tab button "+" mTabs.setImageLevel(1); mTabsCount.setVisibility(View.GONE); + mTabs.setContentDescription(mContext.getString(R.string.new_tab)); } ((TextView) mTabsCount.getCurrentView()).setTextColor(mCounterColor); } @@ -272,7 +274,13 @@ public class BrowserToolbar { public void updateTabCount(int count) { mTabsCount.setCurrentText(String.valueOf(count)); mTabs.setImageLevel(count); - mTabsCount.setVisibility(count > 1 ? View.VISIBLE : View.INVISIBLE); + if (count > 1) { + mTabsCount.setVisibility(View.VISIBLE); + mTabs.setContentDescription(mContext.getString(R.string.num_tabs, count)); + } else { + mTabsCount.setVisibility(View.INVISIBLE); + mTabs.setContentDescription(mContext.getString(R.string.new_tab)); + } } public void setProgressVisibility(boolean visible) { diff --git a/mobile/android/base/locales/en-US/android_strings.dtd b/mobile/android/base/locales/en-US/android_strings.dtd index 174b3e3d62a5..332a1f874709 100644 --- a/mobile/android/base/locales/en-US/android_strings.dtd +++ b/mobile/android/base/locales/en-US/android_strings.dtd @@ -46,6 +46,9 @@ + + diff --git a/mobile/android/base/strings.xml.in b/mobile/android/base/strings.xml.in index c6e180963c5e..7a5a54afb68c 100644 --- a/mobile/android/base/strings.xml.in +++ b/mobile/android/base/strings.xml.in @@ -88,6 +88,7 @@ &close_tab; &new_tab; &new_tab_opened; + &num_tabs; &addons; &downloads; &char_encoding;