| Index: chrome/browser/ui/cocoa/search_engine_dialog_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/search_engine_dialog_controller.mm b/chrome/browser/ui/cocoa/search_engine_dialog_controller.mm
|
| index a51ae40c6fd1842cc69c2978eba1997eb09c404d..1c654a8fb82a2d860a457604ba24ca7d11d0d23b 100644
|
| --- a/chrome/browser/ui/cocoa/search_engine_dialog_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/search_engine_dialog_controller.mm
|
| @@ -196,6 +196,7 @@ void SearchEngineDialogControllerBridge::OnTemplateURLServiceChanged() {
|
| NSView* engineIdentifier = nil; // either the logo or the text label
|
|
|
| int logoId = engine->logo_id();
|
| + NSString* shortName = SysUTF16ToNSString(engine->short_name());
|
| if (useImages && logoId > 0) {
|
| NSImage* logoImage =
|
| ResourceBundle::GetSharedInstance().GetNativeImageNamed(logoId);
|
| @@ -207,7 +208,9 @@ void SearchEngineDialogControllerBridge::OnTemplateURLServiceChanged() {
|
| [logoView setEditable:NO];
|
|
|
| // Tooltip text provides accessibility.
|
| - [logoView setToolTip:base::SysUTF16ToNSString(engine->short_name())];
|
| + [logoView setToolTip:shortName];
|
| + [logoView accessibilitySetOverrideValue:shortName
|
| + forAttribute:NSAccessibilityDescriptionAttribute];
|
| engineIdentifier = logoView;
|
| } else {
|
| // No logo -- we must show a text label.
|
| @@ -226,9 +229,8 @@ void SearchEngineDialogControllerBridge::OnTemplateURLServiceChanged() {
|
| paragraphStyle.get(), NSParagraphStyleAttributeName,
|
| nil];
|
|
|
| - NSString* value = base::SysUTF16ToNSString(engine->short_name());
|
| scoped_nsobject<NSAttributedString> attrValue(
|
| - [[NSAttributedString alloc] initWithString:value
|
| + [[NSAttributedString alloc] initWithString:shortName
|
| attributes:attrs]);
|
|
|
| [labelField setAttributedStringValue:attrValue.get()];
|
| @@ -248,6 +250,11 @@ void SearchEngineDialogControllerBridge::OnTemplateURLServiceChanged() {
|
| [chooseButton setTarget:self];
|
| [chooseButton setAction:@selector(searchEngineSelected:)];
|
|
|
| + // Provide a more descriptive accessibility description.
|
| + id accElement = NSAccessibilityUnignoredDescendant(engineIdentifier);
|
| + [[chooseButton cell] accessibilitySetOverrideValue:accElement
|
| + forAttribute:NSAccessibilityTitleUIElementAttribute];
|
| +
|
| // Put 'em together.
|
| NSRect engineIdentifierFrame = [engineIdentifier frame];
|
| NSRect chooseButtonFrame = [chooseButton frame];
|
|
|