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

Unified Diff: ui/message_center/cocoa/notification_controller.mm

Issue 333643007: Fix progress bar indicator for accessibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/cocoa/notification_controller.mm
diff --git a/ui/message_center/cocoa/notification_controller.mm b/ui/message_center/cocoa/notification_controller.mm
index d2c8bf387c78655c690a77bcf9826822d38d9dc8..43037ff796be482f56e6aff39993af4868ef8b70 100644
--- a/ui/message_center/cocoa/notification_controller.mm
+++ b/ui/message_center/cocoa/notification_controller.mm
@@ -51,6 +51,17 @@
[gfx::SkColorToCalibratedNSColor(message_center::kProgressBarSliceColor) set];
[path fill];
}
+
+-(id)accessibilityAttributeValue:(NSString*)attribute {
dewittj 2014/06/12 21:04:19 Depending on how it looked, this may be more reada
Robert Sesek 2014/06/12 21:23:23 +1
Robert Sesek 2014/06/12 21:23:23 nit: space before ( after the -
Pete Williamson 2014/06/17 18:21:36 Both Done.
+ if ([attribute isEqualToString:NSAccessibilityDescriptionAttribute]) {
+ return [NSString stringWithFormat:@"%lf", [self doubleValue]];
+ } else if ([attribute isEqualToString:NSAccessibilityMinValueAttribute]) {
+ return [NSString stringWithFormat:@"%lf", [self minValue]];
+ } else if ([attribute isEqualToString:NSAccessibilityMaxValueAttribute]) {
+ return [NSString stringWithFormat:@"%lf", [self maxValue]];
+ }
+ return [super accessibilityAttributeValue:attribute];
+}
@end
////////////////////////////////////////////////////////////////////////////////
« 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