<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[170138] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/170138">170138</a></dd>
<dt>Author</dt> <dd>jcraig@apple.com</dd>
<dt>Date</dt> <dd>2014-06-18 19:19:18 -0700 (Wed, 18 Jun 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>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)"
Source/WebCore:
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.
Source/WebInspectorUI:
* 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.
LayoutTests:
* 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.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNodeexpectedtxt">trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNode_liveRegionexpectedtxt">trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNode_liveRegionhtml">trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMAgentcpp">trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorprotocolDOMjson">trunk/Source/WebCore/inspector/protocol/DOM.json</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsDOMNodejs">trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDOMNodeDetailsSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (170137 => 170138)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/LayoutTests/ChangeLog        2014-06-19 02:19:18 UTC (rev 170138)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-06-18 James Craig <jcraig@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.
+
</ins><span class="cx"> 2014-06-18 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Add rebeccapurple to CSS named color list
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNodeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt (170137 => 170138)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -423,6 +423,7 @@
</span><span class="cx"> role: group
</span><span class="cx"> childNodeIds.length: 1
</span><span class="cx"> liveRegionAtomic: true
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: assertive
</span><span class="cx"> parentNodeId: exists
</span><span class="cx">
</span><span class="lines">@@ -432,6 +433,7 @@
</span><span class="cx"> role: group
</span><span class="cx"> childNodeIds.length: 1
</span><span class="cx"> liveRegionAtomic: false
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: polite
</span><span class="cx"> parentNodeId: exists
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNode_liveRegionexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt (170137 => 170138)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,7 +1,91 @@
</span><span class="cx"> Checking Web Inspector protocol (specifically live region properties) for the Accessibility Node Inspector.
</span><span class="cx">
</span><del>-Total elements to be tested: 17.
</del><ins>+Total elements to be tested: 31.
</ins><span class="cx">
</span><ins>+<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
+
</ins><span class="cx"> <div role="timer">off (default)</div>
</span><span class="cx"> exists: true
</span><span class="cx">
</span><span class="lines">@@ -11,11 +95,13 @@
</span><span class="cx"> <div role="status" aria-live="assertive">assertive</div>
</span><span class="cx"> exists: true
</span><span class="cx"> liveRegionAtomic: true
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: assertive
</span><span class="cx">
</span><span class="cx"> <div role="status">polite (default)</div>
</span><span class="cx"> exists: true
</span><span class="cx"> liveRegionAtomic: true
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: polite
</span><span class="cx">
</span><span class="cx"> <div role="marquee">off (default)</div>
</span><span class="lines">@@ -27,16 +113,19 @@
</span><span class="cx"> <div role="log" aria-live="assertive">assertive</div>
</span><span class="cx"> exists: true
</span><span class="cx"> liveRegionAtomic: false
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: assertive
</span><span class="cx">
</span><span class="cx"> <div role="log">polite (default)</div>
</span><span class="cx"> exists: true
</span><span class="cx"> liveRegionAtomic: false
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: polite
</span><span class="cx">
</span><span class="cx"> <div role="alert" aria-live="polite">polite</div>
</span><span class="cx"> exists: true
</span><span class="cx"> liveRegionAtomic: true
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: polite
</span><span class="cx">
</span><span class="cx"> <div role="alert" aria-live="off">off</div>
</span><span class="lines">@@ -45,18 +134,21 @@
</span><span class="cx"> <div role="alert">assertive (default)</div>
</span><span class="cx"> exists: true
</span><span class="cx"> liveRegionAtomic: true
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: assertive
</span><span class="cx">
</span><span class="cx"> <div role="group" aria-live="assertive" aria-busy="true" aria-atomic="false">assertive</div>
</span><span class="cx"> exists: true
</span><span class="cx"> busy: true
</span><span class="cx"> liveRegionAtomic: false
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: assertive
</span><span class="cx">
</span><span class="cx"> <div role="group" aria-live="polite" aria-busy="true" aria-atomic="false">polite</div>
</span><span class="cx"> exists: true
</span><span class="cx"> busy: true
</span><span class="cx"> liveRegionAtomic: false
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: polite
</span><span class="cx">
</span><span class="cx"> <div role="group" aria-live="off" aria-busy="true" aria-atomic="false">off</div>
</span><span class="lines">@@ -67,12 +159,14 @@
</span><span class="cx"> exists: true
</span><span class="cx"> busy: true
</span><span class="cx"> liveRegionAtomic: true
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: assertive
</span><span class="cx">
</span><span class="cx"> <div role="group" aria-live="polite" aria-busy="true" aria-atomic="true">polite</div>
</span><span class="cx"> exists: true
</span><span class="cx"> busy: true
</span><span class="cx"> liveRegionAtomic: true
</span><ins>+ liveRegionRelevant: additions,text
</ins><span class="cx"> liveRegionStatus: polite
</span><span class="cx">
</span><span class="cx"> <div role="group" aria-live="off" aria-busy="true" aria-atomic="true">off</div>
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNode_liveRegionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html (170137 => 170138)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -27,6 +27,21 @@
</span><span class="cx">         <div class="ex" role="status" aria-live="off">off</div>
</span><span class="cx">         <div class="ex" role="timer">off (default)</div>
</span><span class="cx">
</span><ins>+ <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>
+
</ins><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <script type="text/javascript">
</span><span class="lines">@@ -89,6 +104,7 @@
</span><span class="cx"> case "busy":
</span><span class="cx"> case "exists":
</span><span class="cx"> case "liveRegionAtomic":
</span><ins>+ case "liveRegionRelevant":
</ins><span class="cx"> case "liveRegionStatus":
</span><span class="cx"> InspectorTest.log(" " + key + ": " + value);
</span><span class="cx"> break;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (170137 => 170138)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-06-18 James Craig <jcraig@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.
+
</ins><span class="cx"> 2014-06-18 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Add rebeccapurple to CSS named color list
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (170137 => 170138)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1458,6 +1458,7 @@
</span><span class="cx"> bool hidden = false;
</span><span class="cx"> String label; // FIXME: Waiting on http://webkit.org/b/121134
</span><span class="cx"> bool liveRegionAtomic = false;
</span><ins>+ RefPtr<Inspector::TypeBuilder::Array<String>> liveRegionRelevant;
</ins><span class="cx"> TypeBuilder::DOM::AccessibilityProperties::LiveRegionStatus::Enum liveRegionStatus = TypeBuilder::DOM::AccessibilityProperties::LiveRegionStatus::Off;
</span><span class="cx"> Node* mouseEventNode = nullptr;
</span><span class="cx"> RefPtr<Inspector::TypeBuilder::Array<int>> ownedNodeIds;
</span><span class="lines">@@ -1553,6 +1554,31 @@
</span><span class="cx"> if (axObject->supportsARIALiveRegion()) {
</span><span class="cx"> supportsLiveRegion = true;
</span><span class="cx"> liveRegionAtomic = axObject->ariaLiveRegionAtomic();
</span><ins>+
+ 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);
+ }
+ }
+
</ins><span class="cx"> String ariaLive = axObject->ariaLiveRegionStatus();
</span><span class="cx"> if (ariaLive == "assertive")
</span><span class="cx"> liveRegionStatus = TypeBuilder::DOM::AccessibilityProperties::LiveRegionStatus::Assertive;
</span><span class="lines">@@ -1637,6 +1663,8 @@
</span><span class="cx"> value->setHidden(hidden);
</span><span class="cx"> if (supportsLiveRegion) {
</span><span class="cx"> value->setLiveRegionAtomic(liveRegionAtomic);
</span><ins>+ if (liveRegionRelevant->length())
+ value->setLiveRegionRelevant(liveRegionRelevant);
</ins><span class="cx"> value->setLiveRegionStatus(liveRegionStatus);
</span><span class="cx"> }
</span><span class="cx"> if (mouseEventNode)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorprotocolDOMjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/protocol/DOM.json (170137 => 170138)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -13,6 +13,12 @@
</span><span class="cx"> "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the front-end."
</span><span class="cx"> },
</span><span class="cx"> {
</span><ins>+ "id": "LiveRegionRelevant",
+ "type": "string",
+ "enum": ["additions", "removals", "text"],
+ "description": "Token values of @aria-relevant attribute."
+ },
+ {
</ins><span class="cx"> "id": "Node",
</span><span class="cx"> "type": "object",
</span><span class="cx"> "properties": [
</span><span class="lines">@@ -76,6 +82,7 @@
</span><span class="cx"> { "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." },
</span><span class="cx"> { "name": "label", "type": "string", "description": "Computed label value for the node, sometimes calculated by referencing other nodes." },
</span><span class="cx"> { "name": "liveRegionAtomic", "type": "boolean", "optional": true, "description": "Value of @aria-atomic." },
</span><ins>+ { "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" },
</ins><span class="cx"> { "name": "liveRegionStatus", "type": "string", "optional": true, "enum": ["assertive", "polite", "off"], "description": "Value of element's @aria-live attribute." },
</span><span class="cx"> { "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." },
</span><span class="cx"> { "name": "nodeId", "$ref": "NodeId", "description": "Target <code>DOMNode</code> id." },
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (170137 => 170138)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-06-18 James Craig <jcraig@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.
+
</ins><span class="cx"> 2014-06-18 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Add rebeccapurple to CSS named color list
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (170137 => 170138)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -41,7 +41,9 @@
</span><span class="cx">