Diff
Modified: trunk/LayoutTests/ChangeLog (172135 => 172136)
--- trunk/LayoutTests/ChangeLog 2014-08-06 06:14:48 UTC (rev 172135)
+++ trunk/LayoutTests/ChangeLog 2014-08-06 06:21:03 UTC (rev 172136)
@@ -1,3 +1,12 @@
+2014-08-05 James Craig <jcr...@apple.com>
+
+ Web Inspector: AXI: Add label string once AccessibilityObject::computedLabel() is available
+ https://bugs.webkit.org/show_bug.cgi?id=129940
+
+ Reviewed by Chris Fleizach.
+
+ * inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt: LayoutTest expectation update.
+
2014-07-29 Filip Pizlo <fpi...@apple.com>
Merge r170564, r170571, r170604, r170628, r170672, r170680, r170724, r170728, r170729, r170819, r170821, r170836, r170855, r170860, r170890, r170907, r170929, r171052, r171106, r171152, r171153, r171214 from ftlopt.
Modified: trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt (172135 => 172136)
--- trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt 2014-08-06 06:14:48 UTC (rev 172135)
+++ trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt 2014-08-06 06:21:03 UTC (rev 172136)
@@ -56,14 +56,14 @@
<div role="option" aria-busy="true">busy (self)</div>
exists: true
- label:
+ label: busy (self)
role: option
busy: true
parentNodeId: exists
<div role="option">busy (parent)</div>
exists: true
- label:
+ label: busy (parent)
role: option
busy: true
parentNodeId: exists
@@ -83,13 +83,13 @@
<div role="tab" aria-selected="false">not selected</div>
exists: true
- label:
+ label: not selected
role: tab
parentNodeId: exists
<div role="tab" aria-selected="true">selected</div>
exists: true
- label:
+ label: selected
role: tab
parentNodeId: exists
selected: true
@@ -107,13 +107,13 @@
<div role="option" aria-selected="false">not selected</div>
exists: true
- label:
+ label: not selected
role: option
parentNodeId: exists
<div role="option" aria-selected="true">selected</div>
exists: true
- label:
+ label: selected
role: option
parentNodeId: exists
selected: true
@@ -157,7 +157,7 @@
<img src="" alt="x" aria-hidden="true">
exists: true
- label:
+ label: x
role: img
ignored: true
ignoredByDefault: true
@@ -165,7 +165,7 @@
<img src="" alt="x">
exists: true
- label:
+ label: x
role: img
<img src="" alt="">
@@ -202,7 +202,7 @@
<div role="radio" aria-checked="false">unchecked</div>
exists: true
- label:
+ label: unchecked
role: radio
checked: false
parentNodeId: exists
@@ -210,7 +210,7 @@
<div role="radio" aria-checked="mixed">unchecked [sic] mixed state will not be exposed on radios per ARIA spec.</div>
exists: true
- label:
+ label: unchecked [sic] mixed state will not be exposed on radios per ARIA spec.
role: radio
checked: false
parentNodeId: exists
@@ -218,7 +218,7 @@
<div role="radio" aria-checked="true">checked</div>
exists: true
- label:
+ label: checked
role: radio
checked: true
parentNodeId: exists
@@ -226,7 +226,7 @@
<div role="radio">unchecked (checked undefined evals to false on radio)</div>
exists: true
- label:
+ label: unchecked (checked undefined evals to false on radio)
role: radio
checked: false
parentNodeId: exists
@@ -250,7 +250,7 @@
<div role="checkbox" aria-checked="false">unchecked</div>
exists: true
- label:
+ label: unchecked
role: checkbox
checked: false
parentNodeId: exists
@@ -258,7 +258,7 @@
<div role="checkbox" aria-checked="mixed">mixed</div>
exists: true
- label:
+ label: mixed
role: checkbox
checked: mixed
parentNodeId: exists
@@ -266,7 +266,7 @@
<div role="checkbox" aria-checked="true">checked</div>
exists: true
- label:
+ label: checked
role: checkbox
checked: true
parentNodeId: exists
@@ -274,7 +274,7 @@
<div role="checkbox">unchecked (checked undefined evals to false on checkbox)</div>
exists: true
- label:
+ label: unchecked (checked undefined evals to false on checkbox)
role: checkbox
checked: false
parentNodeId: exists
@@ -386,7 +386,7 @@
<div role="button" tabindex="0" aria-pressed="false">Not Pressed.</div>
exists: true
- label:
+ label: Not Pressed.
role:
focused: false
parentNodeId: exists
@@ -395,7 +395,7 @@
<div role="button" tabindex="0" aria-pressed="true">FIXME: Pressed is false. Expected true. http://webkit.org/b/129830</div>
exists: true
- label:
+ label: FIXME: Pressed is false. Expected true. http://webkit.org/b/129830
role:
focused: false
parentNodeId: exists
@@ -404,7 +404,7 @@
<div role="button" tabindex="0" aria-disabled="true">disabled</div>
exists: true
- label:
+ label: disabled
role: button
disabled: true
focused: false
Modified: trunk/Source/WebCore/ChangeLog (172135 => 172136)
--- trunk/Source/WebCore/ChangeLog 2014-08-06 06:14:48 UTC (rev 172135)
+++ trunk/Source/WebCore/ChangeLog 2014-08-06 06:21:03 UTC (rev 172136)
@@ -1,3 +1,18 @@
+2014-08-05 James Craig <jcr...@apple.com>
+
+ Web Inspector: AXI: Add label string once AccessibilityObject::computedLabel() is available
+ https://bugs.webkit.org/show_bug.cgi?id=129940
+
+ Reviewed by Chris Fleizach.
+
+ Test: inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt
+
+ * accessibility/AccessibilityObject.cpp: Fixed crash.
+ (WebCore::AccessibilityObject::accessibilityComputedLabel):
+ * accessibility/AccessibilityObject.h: Method name update.
+ * inspector/InspectorDOMAgent.cpp: New support for getting Node label from AccessibilityObject.
+ (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
+
2014-07-29 Filip Pizlo <fpi...@apple.com>
Merge r170564, r170571, r170604, r170628, r170672, r170680, r170724, r170728, r170729, r170819, r170821, r170836, r170855, r170860, r170890, r170907, r170929, r171052, r171106, r171152, r171153, r171214 from ftlopt.
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (172135 => 172136)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2014-08-06 06:14:48 UTC (rev 172135)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2014-08-06 06:21:03 UTC (rev 172136)
@@ -288,8 +288,12 @@
|| stringValue().contains(*text, false);
}
-String AccessibilityObject::accessibilityComputedLabel()
+String AccessibilityObject::computedLabel()
{
+ // This method is being called by WebKit inspector, which may happen at any time, so we need to update our backing store now.
+ // Also hold onto this object in case updateBackingStore deletes this node.
+ RefPtr<AccessibilityObject> protector(this);
+ updateBackingStore();
Vector<AccessibilityText> text;
accessibilityText(text);
if (text.size())
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (172135 => 172136)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.h 2014-08-06 06:14:48 UTC (rev 172135)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h 2014-08-06 06:21:03 UTC (rev 172136)
@@ -647,8 +647,8 @@
// 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 single method for getting a computed label for an AXObject. It condenses the nuances of accessibilityText. Used by Inspector.
+ String computedLabel();
// A programmatic way to set a name on an AccessibleObject.
virtual void setAccessibleName(const AtomicString&) { }
Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (172135 => 172136)
--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2014-08-06 06:14:48 UTC (rev 172135)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2014-08-06 06:21:03 UTC (rev 172136)
@@ -1457,7 +1457,7 @@
bool ignoredByDefault = false;
TypeBuilder::DOM::AccessibilityProperties::Invalid::Enum invalid = TypeBuilder::DOM::AccessibilityProperties::Invalid::False;
bool hidden = false;
- String label; // FIXME: Waiting on http://webkit.org/b/121134
+ String label;
bool liveRegionAtomic = false;
RefPtr<Inspector::TypeBuilder::Array<String>> liveRegionRelevant;
TypeBuilder::DOM::AccessibilityProperties::LiveRegionStatus::Enum liveRegionStatus = TypeBuilder::DOM::AccessibilityProperties::LiveRegionStatus::Off;
@@ -1552,6 +1552,8 @@
if (axObject->isARIAHidden() || axObject->isDOMHidden())
hidden = true;
+ label = axObject->computedLabel();
+
if (axObject->supportsARIALiveRegion()) {
supportsLiveRegion = true;
liveRegionAtomic = axObject->ariaLiveRegionAtomic();
Modified: trunk/Source/WebInspectorUI/ChangeLog (172135 => 172136)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-08-06 06:14:48 UTC (rev 172135)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-08-06 06:21:03 UTC (rev 172136)
@@ -1,3 +1,13 @@
+2014-08-05 James Craig <jcr...@apple.com>
+
+ Web Inspector: AXI: Add label string once AccessibilityObject::computedLabel() is available
+ https://bugs.webkit.org/show_bug.cgi?id=129940
+
+ Reviewed by Chris Fleizach.
+
+ * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: UI update for label field in Node Inspector.
+ (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
+
2014-08-05 Brian J. Burg <b...@cs.washington.edu>
Web Inspector: support storing multiple timeline recordings in the manager
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js (172135 => 172136)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js 2014-08-06 06:14:48 UTC (rev 172135)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js 2014-08-06 06:21:03 UTC (rev 172136)
@@ -360,6 +360,8 @@
else if (accessibilityProperties.invalid === DOMAgent.AccessibilityPropertiesInvalid.Spelling)
invalid = WebInspector.UIString("Spelling");
+ var label = accessibilityProperties.label;
+
var liveRegionStatus = "";
var liveRegionStatusNode = null;
var liveRegionStatusToken = accessibilityProperties.liveRegionStatus;
@@ -424,11 +426,6 @@
mouseEventNodeLink = linkForNodeId(mouseEventNodeId);
}
- // FIXME: label will always come back as empty. Blocked by http://webkit.org/b/121134
- var label = accessibilityProperties.label;
- if (label && label !== domNode.getAttribute("aria-label"))
- label = WebInspector.UIString("%s (computed)").format(label);
-
var ownedNodeLinkList = linkListForNodeIds(accessibilityProperties.ownedNodeIds);
// Accessibility tree parent is not a 1:1 mapping with the DOM tree parent.