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

Side by Side Diff: content/browser/accessibility/browser_accessibility_cocoa.mm

Issue 2587343004: Finish implementation and tests of 5 ARIA 1.1 attributes. (Closed)
Patch Set: Rebase on previous change Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <execinfo.h> 5 #include <execinfo.h>
6 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #import "content/browser/accessibility/browser_accessibility_cocoa.h" 9 #import "content/browser/accessibility/browser_accessibility_cocoa.h"
10 10
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 if (browserAccessibility_->IsWebAreaForPresentationalIframe()) 1330 if (browserAccessibility_->IsWebAreaForPresentationalIframe())
1331 return NSAccessibilityGroupRole; 1331 return NSAccessibilityGroupRole;
1332 1332
1333 return [AXPlatformNodeCocoa nativeRoleFromAXRole:role]; 1333 return [AXPlatformNodeCocoa nativeRoleFromAXRole:role];
1334 } 1334 }
1335 1335
1336 // Returns a string indicating the role description of this object. 1336 // Returns a string indicating the role description of this object.
1337 - (NSString*)roleDescription { 1337 - (NSString*)roleDescription {
1338 if (![self instanceActive]) 1338 if (![self instanceActive])
1339 return nil; 1339 return nil;
1340
1341 if (browserAccessibility_->HasStringAttribute(
1342 ui::AX_ATTR_ROLE_DESCRIPTION)) {
1343 return NSStringForStringAttribute(
1344 browserAccessibility_, ui::AX_ATTR_ROLE_DESCRIPTION);
1345 }
1346
1340 NSString* role = [self role]; 1347 NSString* role = [self role];
1341 1348
1342 ContentClient* content_client = content::GetContentClient(); 1349 ContentClient* content_client = content::GetContentClient();
1343 1350
1344 // The following descriptions are specific to webkit. 1351 // The following descriptions are specific to webkit.
1345 if ([role isEqualToString:@"AXWebArea"]) { 1352 if ([role isEqualToString:@"AXWebArea"]) {
1346 return base::SysUTF16ToNSString(content_client->GetLocalizedString( 1353 return base::SysUTF16ToNSString(content_client->GetLocalizedString(
1347 IDS_AX_ROLE_WEB_AREA)); 1354 IDS_AX_ROLE_WEB_AREA));
1348 } 1355 }
1349 1356
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
2883 } 2890 }
2884 2891
2885 - (BOOL)accessibilityNotifiesWhenDestroyed { 2892 - (BOOL)accessibilityNotifiesWhenDestroyed {
2886 // Indicate that BrowserAccessibilityCocoa will post a notification when it's 2893 // Indicate that BrowserAccessibilityCocoa will post a notification when it's
2887 // destroyed (see -detach). This allows VoiceOver to do some internal things 2894 // destroyed (see -detach). This allows VoiceOver to do some internal things
2888 // more efficiently. 2895 // more efficiently.
2889 return YES; 2896 return YES;
2890 } 2897 }
2891 2898
2892 @end 2899 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698