Index: Source/modules/accessibility/AXListBoxOption.cpp |
diff --git a/Source/modules/accessibility/AXListBoxOption.cpp b/Source/modules/accessibility/AXListBoxOption.cpp |
index 58a91d3a8961d74c081a87413373c69a193e9678..f450328eeab67642bf32845c88ef392982a65305 100644 |
--- a/Source/modules/accessibility/AXListBoxOption.cpp |
+++ b/Source/modules/accessibility/AXListBoxOption.cpp |
@@ -58,9 +58,32 @@ AccessibilityRole AXListBoxOption::roleValue() const |
AccessibilityRole ariaRole = ariaRoleAttribute(); |
if (ariaRole != UnknownRole) |
return ariaRole; |
+ |
+ // This is for handling presentation Role. |
+ // Currently IE handles presentation role correctly with OptionElement. |
dmazzoni
2015/03/29 07:46:22
I'd leave out this comment on IE unless the only r
je_julie(Not used)
2015/03/31 16:14:27
I replaced the comment with the spec description.
|
+ // It doesn't ignore tree but handles it with Static Text Role. |
+ // That's why it's handled in roleValue(), not in computeAccessibilityIsIgnored() |
+ if (isParentPresentationRole()) |
+ return StaticTextRole; |
+ |
return ListBoxOptionRole; |
} |
+bool AXListBoxOption::isParentPresentationRole() const |
+{ |
+ AXObject* parent = parentObject(); |
+ if (!parent) |
+ return false; |
+ |
+ Node* parentNode = parent->node(); |
+ if (isHTMLSelectElement(parentNode)) { |
+ HTMLSelectElement& selectElement = toHTMLSelectElement(*parentNode); |
+ if (selectElement.multiple() && isPresentationRole(parent)) |
+ return true; |
+ } |
+ return false; |
+} |
+ |
bool AXListBoxOption::isEnabled() const |
{ |
if (!node()) |