Commit 50c5452d authored by petewil@chromium.org's avatar petewil@chromium.org

Fix progress bar indicator for accessibility.

The progress bar was not being read properly by screen readers for the
Mac (VoiceOver).  This gives the screen reader enough information to
do its job.

BUG=370512

Review URL: https://codereview.chromium.org/333643007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277880 0039d316-1c4b-4281-b951-d872f2087c98
parent 5c060302
...@@ -51,6 +51,21 @@ ...@@ -51,6 +51,21 @@
[gfx::SkColorToCalibratedNSColor(message_center::kProgressBarSliceColor) set]; [gfx::SkColorToCalibratedNSColor(message_center::kProgressBarSliceColor) set];
[path fill]; [path fill];
} }
- (id)accessibilityAttributeValue:(NSString*)attribute {
double progressValue = 0.0;
if ([attribute isEqualToString:NSAccessibilityDescriptionAttribute]) {
progressValue = [self doubleValue];
} else if ([attribute isEqualToString:NSAccessibilityMinValueAttribute]) {
progressValue = [self minValue];
} else if ([attribute isEqualToString:NSAccessibilityMaxValueAttribute]) {
progressValue = [self maxValue];
} else {
return [super accessibilityAttributeValue:attribute];
}
return [NSString stringWithFormat:@"%lf", progressValue];
}
@end @end
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment