Index: Source/modules/accessibility/AXNodeObject.cpp |
diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp |
index f1aa72513048d0ece5da01c61bd8f687213e7dbc..7c93026469ede0767dc827637fc857fb49cabfb3 100644 |
--- a/Source/modules/accessibility/AXNodeObject.cpp |
+++ b/Source/modules/accessibility/AXNodeObject.cpp |
@@ -241,7 +241,7 @@ AccessibilityRole AXNodeObject::determineAccessibilityRoleUtil() |
} |
if (isHTMLSelectElement(*node())) { |
HTMLSelectElement& selectElement = toHTMLSelectElement(*node()); |
- return selectElement.multiple() ? ListBoxRole : PopUpButtonRole; |
+ return (selectElement.multiple() || selectElement.size() > 1) ? ListBoxRole : PopUpButtonRole; |
} |
if (isHTMLTextAreaElement(*node())) |
return TextAreaRole; |
@@ -1190,14 +1190,21 @@ String AXNodeObject::stringValue() const |
if (!overriddenDescription.isNull()) |
return overriddenDescription; |
} |
- if (!selectElement.multiple()) |
- return selectElement.value(); |
- return String(); |
+ return selectElement.value(); |
} |
if (isTextControl()) |
return text(); |
+ // Handle other HTML input elements that aren't text controls, like date and time |
+ // controls, by returning the string value, with the exception of checkboxes |
+ // and radio buttons (which would return "on"). |
+ if (node && isHTMLInputElement(node)) { |
+ HTMLInputElement* input = toHTMLInputElement(node); |
+ if (input->type() != InputTypeNames::checkbox && input->type() != InputTypeNames::radio) |
+ return input->value(); |
dmazzoni
2015/01/29 16:28:29
Thanks, this change looks good.
|
+ } |
+ |
// FIXME: We might need to implement a value here for more types |
// FIXME: It would be better not to advertise a value at all for the types for which we don't implement one; |
// this would require subclassing or making accessibilityAttributeNames do something other than return a |