Index: content/browser/accessibility/browser_accessibility_cocoa.mm |
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm |
index b6f58df044fc51f8c58a13dc56c6b2e67b010dd8..b09e4d6b5d81bef64cac70da14030ec94443ba73 100644 |
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm |
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm |
@@ -109,6 +109,7 @@ NSDictionary* attributeToMethodNameMap = nil; |
{ @"AXARIABusy", @"ariaBusy" }, |
{ @"AXARIALive", @"ariaLive" }, |
{ @"AXARIARelevant", @"ariaRelevant" }, |
+ { @"AXGrabbed", @"grabbed" }, |
{ @"AXInvalid", @"invalid" }, |
{ @"AXLoaded", @"loaded" }, |
{ @"AXLoadingProgress", @"loadingProgress" }, |
@@ -343,6 +344,11 @@ NSDictionary* attributeToMethodNameMap = nil; |
return ret; |
} |
+- (NSNumber*)grabbed { |
+ bool boolValue = browserAccessibility_->GetBoolAttribute(ui::AX_ATTR_GRABBED); |
+ return [NSNumber numberWithBool:boolValue]; |
+} |
+ |
- (id)header { |
int headerElementId = -1; |
if ([self internalRole] == ui::AX_ROLE_TABLE || |
@@ -1386,8 +1392,14 @@ NSDictionary* attributeToMethodNameMap = nil; |
@"AXARIABusy", |
nil]]; |
} |
+ // Add aria-grabbed attribute only if it has true. |
+ if (browserAccessibility_->HasBoolAttribute(ui::AX_ATTR_GRABBED)) { |
+ [ret addObjectsFromArray:[NSArray arrayWithObjects: |
+ @"AXGrabbed", |
+ nil]]; |
+ } |
- //Add expanded attribute only if it has expanded or collapsed state. |
+ // Add expanded attribute only if it has expanded or collapsed state. |
if (GetState(browserAccessibility_, ui::AX_STATE_EXPANDED) || |
GetState(browserAccessibility_, ui::AX_STATE_COLLAPSED)) { |
[ret addObjectsFromArray:[NSArray arrayWithObjects: |