Title: [172021] trunk/Source/WebCore
- Revision
- 172021
- Author
- [email protected]
- Date
- 2014-08-04 19:47:01 -0700 (Mon, 04 Aug 2014)
Log Message
AX: add AccessibilityObject::computedLabelString() for WebAXI
https://bugs.webkit.org/show_bug.cgi?id=129939
Reviewed by Mario Sanchez Prada.
Provide a method that the WebKit Inspector can call in order to
display an accessible name for an AX node.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::accessibilityComputedLabel):
* accessibility/AccessibilityObject.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (172020 => 172021)
--- trunk/Source/WebCore/ChangeLog 2014-08-05 02:01:46 UTC (rev 172020)
+++ trunk/Source/WebCore/ChangeLog 2014-08-05 02:47:01 UTC (rev 172021)
@@ -1,3 +1,17 @@
+2014-08-04 Chris Fleizach <[email protected]>
+
+ AX: add AccessibilityObject::computedLabelString() for WebAXI
+ https://bugs.webkit.org/show_bug.cgi?id=129939
+
+ Reviewed by Mario Sanchez Prada.
+
+ Provide a method that the WebKit Inspector can call in order to
+ display an accessible name for an AX node.
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::accessibilityComputedLabel):
+ * accessibility/AccessibilityObject.h:
+
2014-08-04 Tim Horton <[email protected]>
Lots of crashes in WebKit1 after r172013.
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (172020 => 172021)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2014-08-05 02:01:46 UTC (rev 172020)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2014-08-05 02:47:01 UTC (rev 172021)
@@ -287,6 +287,15 @@
|| accessibilityDescription().contains(*text, false)
|| stringValue().contains(*text, false);
}
+
+String AccessibilityObject::accessibilityComputedLabel()
+{
+ Vector<AccessibilityText> text;
+ accessibilityText(text);
+ if (text.size())
+ return text[0].text;
+ return String();
+}
bool AccessibilityObject::isBlockquote() const
{
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (172020 => 172021)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.h 2014-08-05 02:01:46 UTC (rev 172020)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h 2014-08-05 02:47:01 UTC (rev 172021)
@@ -647,7 +647,9 @@
// Accessibility Text
virtual void accessibilityText(Vector<AccessibilityText>&) { };
-
+ // A single methods for getting a computed label for an AXObject. It condenses the nuances of accessibilityText. Used by Inspector.
+ String accessibilityComputedLabel();
+
// A programmatic way to set a name on an AccessibleObject.
virtual void setAccessibleName(const AtomicString&) { }
virtual bool hasAttributesRequiredForInclusion() const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes