Index: Source/modules/accessibility/AXNodeObject.cpp |
diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp |
index 62df989824998934fb1e8d1294a04b3885f25598..4f88fcf6135f4add4895491819fbf9e2d6e07f0a 100644 |
--- a/Source/modules/accessibility/AXNodeObject.cpp |
+++ b/Source/modules/accessibility/AXNodeObject.cpp |
@@ -1371,6 +1371,40 @@ String AXNodeObject::helpText() const |
return String(); |
} |
+String AXNodeObject::computedName() const |
+{ |
+ String title = this->title(); |
+ |
+ String titleUIText; |
+ if (title.isEmpty()) { |
+ AXObject* titleUIElement = this->titleUIElement(); |
+ if (titleUIElement) { |
+ titleUIText = titleUIElement->textUnderElement(); |
+ if (!titleUIText.isEmpty()) |
+ return titleUIText; |
+ } |
+ } |
+ |
+ String description = accessibilityDescription(); |
+ if (!description.isEmpty()) |
+ return description; |
+ |
+ if (!title.isEmpty()) |
+ return title; |
+ |
+ String placeholder; |
+ if (isHTMLInputElement(node())) { |
+ HTMLInputElement* element = toHTMLInputElement(node()); |
+ placeholder = element->strippedPlaceholder(); |
+ if (!placeholder.isEmpty()) |
+ return placeholder; |
+ } |
+ |
+ return String(); |
+} |
+ |
+ |
+ |
LayoutRect AXNodeObject::elementRect() const |
{ |
// First check if it has a custom rect, for example if this element is tied to a canvas path. |