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 33a95c4b6dd33dbca8076ac5e76e9dceab2ca08e..bb3e2b5245171535fce7dbe98ae5c222e7b4adea 100644 |
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm |
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm |
@@ -446,20 +446,12 @@ NSDictionary* attributeToMethodNameMap = nil; |
} |
- (NSString*)orientation { |
- // We present a spin button as a vertical slider, with a role description |
- // of "spin button". |
- if ([self internalRole] == ui::AX_ROLE_SPIN_BUTTON) |
- return NSAccessibilityVerticalOrientationValue; |
- |
- if ([self internalRole] == ui::AX_ROLE_LIST || |
- [self internalRole] == ui::AX_ROLE_LIST_BOX) { |
- return NSAccessibilityVerticalOrientationValue; |
- } |
- |
if (GetState(browserAccessibility_, ui::AX_STATE_VERTICAL)) |
return NSAccessibilityVerticalOrientationValue; |
- else |
+ else if (GetState(browserAccessibility_, ui::AX_STATE_HORIZONTAL)) |
return NSAccessibilityHorizontalOrientationValue; |
+ |
+ return @""; |
} |
- (NSNumber*)numberOfCharacters { |
@@ -1277,7 +1269,6 @@ NSDictionary* attributeToMethodNameMap = nil; |
[ret addObjectsFromArray:[NSArray arrayWithObjects: |
NSAccessibilityMaxValueAttribute, |
NSAccessibilityMinValueAttribute, |
- NSAccessibilityOrientationAttribute, |
NSAccessibilityValueDescriptionAttribute, |
nil]]; |
} else if ([subrole isEqualToString:NSAccessibilityOutlineRowSubrole]) { |
@@ -1308,7 +1299,6 @@ NSDictionary* attributeToMethodNameMap = nil; |
} |
} else if ([role isEqualToString:NSAccessibilityListRole]) { |
[ret addObjectsFromArray:[NSArray arrayWithObjects: |
- NSAccessibilityOrientationAttribute, |
NSAccessibilitySelectedChildrenAttribute, |
NSAccessibilityVisibleChildrenAttribute, |
nil]]; |
@@ -1355,6 +1345,12 @@ NSDictionary* attributeToMethodNameMap = nil; |
nil]]; |
} |
+ if (GetState(browserAccessibility_, ui::AX_STATE_VERTICAL) |
+ || GetState(browserAccessibility_, ui::AX_STATE_HORIZONTAL)) { |
+ [ret addObjectsFromArray:[NSArray arrayWithObjects: |
+ NSAccessibilityOrientationAttribute, nil]]; |
+ } |
+ |
// Title UI Element. |
if (browserAccessibility_->HasIntAttribute(ui::AX_ATTR_TITLE_UI_ELEMENT) || |
(browserAccessibility_->HasIntListAttribute(ui::AX_ATTR_LABELLEDBY_IDS) && |