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

Unified Diff: ash/system/date/date_view.cc

Issue 12217121: Add accessibility support for reading date and time on ash tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/date/date_view.cc
diff --git a/ash/system/date/date_view.cc b/ash/system/date/date_view.cc
index e59b42ed2aa737071563780ed85e8b02a9dd0337..fd7fad0c84682707f433923bd909b8e985c7afb2 100644
--- a/ash/system/date/date_view.cc
+++ b/ash/system/date/date_view.cc
@@ -136,6 +136,11 @@ void DateView::SetActionable(bool actionable) {
}
void DateView::UpdateTextInternal(const base::Time& now) {
+ SetAccessibleName(
+ base::TimeFormatFriendlyDate(now) +
+ ASCIIToUTF16(",") +
+ base::TimeFormatTimeOfDayWithHourClockType(
+ now, base::k12HourClock, base:: kKeepAmPm));
Jun Mukai 2013/02/12 01:04:03 Is there some reason to be comma-separated rather
jennyz 2013/02/12 01:07:38 IDS_ASH_STATUS_TRAY_DATE has the week in short for
Jun Mukai 2013/02/12 01:15:05 ah, that makes sense. thanks!
date_label_->SetText(
l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_DATE, FormatDayOfWeek(now), FormatDate(now)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698