Diff
Modified: trunk/LayoutTests/ChangeLog (170137 => 170138)
--- trunk/LayoutTests/ChangeLog 2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/LayoutTests/ChangeLog 2014-06-19 02:19:18 UTC (rev 170138)
@@ -1,3 +1,17 @@
+2014-06-18 James Craig <jcr...@apple.com>
+
+ Web Inspector: AXI: expose aria-relevant
+ https://bugs.webkit.org/show_bug.cgi?id=130913
+
+ Reviewed by Joseph Pecoraro.
+
+ Expose ARIA live region relevance in Web Inspector.
+ E.g. "Live: Assertive (Additions, Text)"
+
+ * inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt: Minor update.
+ * inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt: Updated with new output.
+ * inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html: Updated with new elements.
+
2014-06-18 Simon Fraser <simon.fra...@apple.com>
Add rebeccapurple to CSS named color list
Modified: trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt (170137 => 170138)
--- trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt 2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt 2014-06-19 02:19:18 UTC (rev 170138)
@@ -423,6 +423,7 @@
role: group
childNodeIds.length: 1
liveRegionAtomic: true
+ liveRegionRelevant: additions,text
liveRegionStatus: assertive
parentNodeId: exists
@@ -432,6 +433,7 @@
role: group
childNodeIds.length: 1
liveRegionAtomic: false
+ liveRegionRelevant: additions,text
liveRegionStatus: polite
parentNodeId: exists
Modified: trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt (170137 => 170138)
--- trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt 2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt 2014-06-19 02:19:18 UTC (rev 170138)
@@ -1,7 +1,91 @@
Checking Web Inspector protocol (specifically live region properties) for the Accessibility Node Inspector.
-Total elements to be tested: 17.
+Total elements to be tested: 31.
+<div role="alert" aria-relevant="text text">relevant: text (duplicate)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="additions removals removals">relevant: additions removals (duplicate)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="text removals additions">relevant: all (implicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="text additions removals">relevant: all (implicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="additions removals text">relevant: all (implicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="all">relevant: all (explicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="additions">relevant: additions</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="text">relevant: text</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="removals">relevant: removals</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: removals
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="removals text">relevant: removals text</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: removals,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="additions removals">relevant: additions removals</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="text additions">relevant: additions text (order should be normalized)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="additions text">relevant: additions text (explicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+
+<div role="alert">relevant: additions text (implicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+
<div role="timer">off (default)</div>
exists: true
@@ -11,11 +95,13 @@
<div role="status" aria-live="assertive">assertive</div>
exists: true
liveRegionAtomic: true
+ liveRegionRelevant: additions,text
liveRegionStatus: assertive
<div role="status">polite (default)</div>
exists: true
liveRegionAtomic: true
+ liveRegionRelevant: additions,text
liveRegionStatus: polite
<div role="marquee">off (default)</div>
@@ -27,16 +113,19 @@
<div role="log" aria-live="assertive">assertive</div>
exists: true
liveRegionAtomic: false
+ liveRegionRelevant: additions,text
liveRegionStatus: assertive
<div role="log">polite (default)</div>
exists: true
liveRegionAtomic: false
+ liveRegionRelevant: additions,text
liveRegionStatus: polite
<div role="alert" aria-live="polite">polite</div>
exists: true
liveRegionAtomic: true
+ liveRegionRelevant: additions,text
liveRegionStatus: polite
<div role="alert" aria-live="off">off</div>
@@ -45,18 +134,21 @@
<div role="alert">assertive (default)</div>
exists: true
liveRegionAtomic: true
+ liveRegionRelevant: additions,text
liveRegionStatus: assertive
<div role="group" aria-live="assertive" aria-busy="true" aria-atomic="false">assertive</div>
exists: true
busy: true
liveRegionAtomic: false
+ liveRegionRelevant: additions,text
liveRegionStatus: assertive
<div role="group" aria-live="polite" aria-busy="true" aria-atomic="false">polite</div>
exists: true
busy: true
liveRegionAtomic: false
+ liveRegionRelevant: additions,text
liveRegionStatus: polite
<div role="group" aria-live="off" aria-busy="true" aria-atomic="false">off</div>
@@ -67,12 +159,14 @@
exists: true
busy: true
liveRegionAtomic: true
+ liveRegionRelevant: additions,text
liveRegionStatus: assertive
<div role="group" aria-live="polite" aria-busy="true" aria-atomic="true">polite</div>
exists: true
busy: true
liveRegionAtomic: true
+ liveRegionRelevant: additions,text
liveRegionStatus: polite
<div role="group" aria-live="off" aria-busy="true" aria-atomic="true">off</div>
Modified: trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html (170137 => 170138)
--- trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html 2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html 2014-06-19 02:19:18 UTC (rev 170138)
@@ -27,6 +27,21 @@
<div class="ex" role="status" aria-live="off">off</div>
<div class="ex" role="timer">off (default)</div>
+ <div class="ex" role="alert">relevant: additions text (implicit)</div>
+ <div class="ex" role="alert" aria-relevant="additions text">relevant: additions text (explicit)</div>
+ <div class="ex" role="alert" aria-relevant="text additions">relevant: additions text (order should be normalized)</div>
+ <div class="ex" role="alert" aria-relevant="additions removals">relevant: additions removals</div>
+ <div class="ex" role="alert" aria-relevant="removals text">relevant: removals text</div>
+ <div class="ex" role="alert" aria-relevant="removals">relevant: removals</div>
+ <div class="ex" role="alert" aria-relevant="text">relevant: text</div>
+ <div class="ex" role="alert" aria-relevant="additions">relevant: additions</div>
+ <div class="ex" role="alert" aria-relevant="all">relevant: all (explicit)</div>
+ <div class="ex" role="alert" aria-relevant="additions removals text">relevant: all (implicit)</div>
+ <div class="ex" role="alert" aria-relevant="text additions removals">relevant: all (implicit)</div>
+ <div class="ex" role="alert" aria-relevant="text removals additions">relevant: all (implicit)</div>
+ <div class="ex" role="alert" aria-relevant="additions removals removals">relevant: additions removals (duplicate)</div>
+ <div class="ex" role="alert" aria-relevant="text text">relevant: text (duplicate)</div>
+
</div>
<script type="text/_javascript_">
@@ -89,6 +104,7 @@
case "busy":
case "exists":
case "liveRegionAtomic":
+ case "liveRegionRelevant":
case "liveRegionStatus":
InspectorTest.log(" " + key + ": " + value);
break;
Modified: trunk/Source/WebCore/ChangeLog (170137 => 170138)
--- trunk/Source/WebCore/ChangeLog 2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/Source/WebCore/ChangeLog 2014-06-19 02:19:18 UTC (rev 170138)
@@ -1,3 +1,19 @@
+2014-06-18 James Craig <jcr...@apple.com>
+
+ Web Inspector: AXI: expose aria-relevant
+ https://bugs.webkit.org/show_bug.cgi?id=130913
+
+ Reviewed by Joseph Pecoraro.
+
+ Expose ARIA live region relevance in Web Inspector.
+ E.g. "Live: Assertive (Additions, Text)"
+
+ Test: inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): Support for liveRegionRelevant.
+ * inspector/protocol/DOM.json: Defined enum values and array passed to client.
+
2014-06-18 Simon Fraser <simon.fra...@apple.com>
Add rebeccapurple to CSS named color list
Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (170137 => 170138)
--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2014-06-19 02:19:18 UTC (rev 170138)
@@ -1458,6 +1458,7 @@
bool hidden = false;
String label; // FIXME: Waiting on http://webkit.org/b/121134
bool liveRegionAtomic = false;
+ RefPtr<Inspector::TypeBuilder::Array<String>> liveRegionRelevant;
TypeBuilder::DOM::AccessibilityProperties::LiveRegionStatus::Enum liveRegionStatus = TypeBuilder::DOM::AccessibilityProperties::LiveRegionStatus::Off;
Node* mouseEventNode = nullptr;
RefPtr<Inspector::TypeBuilder::Array<int>> ownedNodeIds;
@@ -1553,6 +1554,31 @@
if (axObject->supportsARIALiveRegion()) {
supportsLiveRegion = true;
liveRegionAtomic = axObject->ariaLiveRegionAtomic();
+
+ String ariaRelevantAttrValue = axObject->ariaLiveRegionRelevant();
+ if (!ariaRelevantAttrValue.isEmpty()) {
+ // FIXME: Pass enum values rather than strings once unblocked. http://webkit.org/b/133711
+ String ariaRelevantAdditions = TypeBuilder::getWebEnumConstantValue(TypeBuilder::DOM::LiveRegionRelevant::Additions);
+ String ariaRelevantRemovals = TypeBuilder::getWebEnumConstantValue(TypeBuilder::DOM::LiveRegionRelevant::Removals);
+ String ariaRelevantText = TypeBuilder::getWebEnumConstantValue(TypeBuilder::DOM::LiveRegionRelevant::Text);
+ liveRegionRelevant = Inspector::TypeBuilder::Array<String>::create();
+ const SpaceSplitString& values = SpaceSplitString(ariaRelevantAttrValue, true);
+ // @aria-relevant="all" is exposed as ["additions","removals","text"], in order.
+ // This order is controlled in WebCore and expected in WebInspectorUI.
+ if (values.contains("all")) {
+ liveRegionRelevant->addItem(ariaRelevantAdditions);
+ liveRegionRelevant->addItem(ariaRelevantRemovals);
+ liveRegionRelevant->addItem(ariaRelevantText);
+ } else {
+ if (values.contains(ariaRelevantAdditions))
+ liveRegionRelevant->addItem(ariaRelevantAdditions);
+ if (values.contains(ariaRelevantRemovals))
+ liveRegionRelevant->addItem(ariaRelevantRemovals);
+ if (values.contains(ariaRelevantText))
+ liveRegionRelevant->addItem(ariaRelevantText);
+ }
+ }
+
String ariaLive = axObject->ariaLiveRegionStatus();
if (ariaLive == "assertive")
liveRegionStatus = TypeBuilder::DOM::AccessibilityProperties::LiveRegionStatus::Assertive;
@@ -1637,6 +1663,8 @@
value->setHidden(hidden);
if (supportsLiveRegion) {
value->setLiveRegionAtomic(liveRegionAtomic);
+ if (liveRegionRelevant->length())
+ value->setLiveRegionRelevant(liveRegionRelevant);
value->setLiveRegionStatus(liveRegionStatus);
}
if (mouseEventNode)
Modified: trunk/Source/WebCore/inspector/protocol/DOM.json (170137 => 170138)
--- trunk/Source/WebCore/inspector/protocol/DOM.json 2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/Source/WebCore/inspector/protocol/DOM.json 2014-06-19 02:19:18 UTC (rev 170138)
@@ -13,6 +13,12 @@
"description": "Unique DOM node identifier used to reference a node that may not have been pushed to the front-end."
},
{
+ "id": "LiveRegionRelevant",
+ "type": "string",
+ "enum": ["additions", "removals", "text"],
+ "description": "Token values of @aria-relevant attribute."
+ },
+ {
"id": "Node",
"type": "object",
"properties": [
@@ -76,6 +82,7 @@
{ "name": "hidden", "type": "boolean", "optional": true, "description": "Hidden state. True if node or an ancestor is hidden via CSS or explicit @aria-hidden, to clarify why the element is ignored." },
{ "name": "label", "type": "string", "description": "Computed label value for the node, sometimes calculated by referencing other nodes." },
{ "name": "liveRegionAtomic", "type": "boolean", "optional": true, "description": "Value of @aria-atomic." },
+ { "name": "liveRegionRelevant", "type": "array", "items": { "type": "string" }, "optional": true, "description": "Token value(s) of element's @aria-relevant attribute. Array of string values matching $ref LiveRegionRelevant. FIXME: Enum values blocked by http://webkit.org/b/133711" },
{ "name": "liveRegionStatus", "type": "string", "optional": true, "enum": ["assertive", "polite", "off"], "description": "Value of element's @aria-live attribute." },
{ "name": "mouseEventNodeId", "$ref": "NodeId", "optional": true, "description": "<code>DOMNode</code> id of node or closest ancestor node that has a mousedown, mouseup, or click event handler." },
{ "name": "nodeId", "$ref": "NodeId", "description": "Target <code>DOMNode</code> id." },
Modified: trunk/Source/WebInspectorUI/ChangeLog (170137 => 170138)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-06-19 02:19:18 UTC (rev 170138)
@@ -1,3 +1,17 @@
+2014-06-18 James Craig <jcr...@apple.com>
+
+ Web Inspector: AXI: expose aria-relevant
+ https://bugs.webkit.org/show_bug.cgi?id=130913
+
+ Reviewed by Joseph Pecoraro.
+
+ Expose ARIA live region relevance in Web Inspector.
+ E.g. "Live: Assertive (Additions, Text)"
+
+ * Localizations/en.lproj/localizedStrings.js: New strings.
+ * UserInterface/Models/DOMNode.js: One additional property passed.
+ * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: UI updates to support new property.
+
2014-06-18 Simon Fraser <simon.fra...@apple.com>
Add rebeccapurple to CSS named color list
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (170137 => 170138)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2014-06-19 02:19:18 UTC (rev 170138)
@@ -41,7 +41,9 @@
l o c a l i z e d S t r i n g s [ "