Title: [170138] trunk
Revision
170138
Author
jcr...@apple.com
Date
2014-06-18 19:19:18 -0700 (Wed, 18 Jun 2014)

Log Message

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.

Modified Paths

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 @@
 localizedStrings["Add New"] = "Add New";
 localizedStrings["Add New Probe Expression"] = "Add New Probe Expression";
 localizedStrings["Add new breakpoint action after this action"] = "Add new breakpoint action after this action";
+localizedStrings["Additions"] = "Additions";
 localizedStrings["All"] = "All";
+localizedStrings["All Changes"] = "All Changes";
 localizedStrings["All Exceptions"] = "All Exceptions";
 localizedStrings["All Uncaught Exceptions"] = "All Uncaught Exceptions";
 localizedStrings["An error occured trying to\nread the  %s  table."] = "An error occured trying to\nread the  %s  table.";
@@ -345,6 +347,7 @@
 localizedStrings["Region announced in its entirety."] = "Region announced in its entirety.";
 localizedStrings["Region Flow"] = "Region Flow";
 localizedStrings["Reload page (%s)\nReload ignoring cache (%s)"] = "Reload page (%s)\nReload ignoring cache (%s)";
+localizedStrings["Removals"] = "Removals";
 localizedStrings["Remove this breakpoint action"] = "Remove this breakpoint action";
 localizedStrings["Repeating Linear Gradient"] = "Repeating Linear Gradient";
 localizedStrings["Repeating Radial Gradient"] = "Repeating Radial Gradient";
@@ -421,6 +424,7 @@
 localizedStrings["Styles Recalculated"] = "Styles Recalculated";
 localizedStrings["Stylesheet"] = "Stylesheet";
 localizedStrings["Stylesheets"] = "Stylesheets";
+localizedStrings["Text"] = "Text";
 localizedStrings["Text Node"] = "Text Node";
 localizedStrings["Text Only"] = "Text Only";
 localizedStrings["The  %s \ntable is empty."] = "The  %s \ntable is empty.";

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js (170137 => 170138)


--- trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js	2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js	2014-06-19 02:19:18 UTC (rev 170138)
@@ -378,6 +378,7 @@
                     hidden: accessibilityProperties.hidden,
                     label: accessibilityProperties.label,
                     liveRegionAtomic: accessibilityProperties.liveRegionAtomic,
+                    liveRegionRelevant: accessibilityProperties.liveRegionRelevant,
                     liveRegionStatus: accessibilityProperties.liveRegionStatus,
                     mouseEventNodeId: accessibilityProperties.mouseEventNodeId,
                     nodeId: accessibilityProperties.nodeId,

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js (170137 => 170138)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js	2014-06-19 00:30:50 UTC (rev 170137)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js	2014-06-19 02:19:18 UTC (rev 170138)
@@ -373,15 +373,45 @@
                 default:
                     liveRegionStatus = "";
                 }
-                if (liveRegionStatus && accessibilityProperties.liveRegionAtomic === true) {
-                    liveRegionStatusNode = document.createElement("div");
-                    liveRegionStatusNode.className = "value-with-clarification";
-                    liveRegionStatusNode.setAttribute("role", "text");
-                    liveRegionStatusNode.appendChild(document.createTextNode(liveRegionStatus));
-                    var clarificationNode = document.createElement("div");
-                    clarificationNode.className = "clarification";
-                    clarificationNode.appendChild(document.createTextNode(WebInspector.UIString("Region announced in its entirety.")));
-                    liveRegionStatusNode.appendChild(clarificationNode);
+                if (liveRegionStatus) {
+                    var liveRegionRelevant = accessibilityProperties.liveRegionRelevant;
+                    // Append @aria-relevant values. E.g. "Live: Assertive (Additions, Text)".
+                    if (liveRegionRelevant && liveRegionRelevant.length) {
+                        // @aria-relevant="all" is exposed as ["additions","removals","text"], in order.
+                        // This order is controlled in WebCore and expected in WebInspectorUI.
+                        if (liveRegionRelevant.length === 3 
+                            && liveRegionRelevant[0] === DOMAgent.LiveRegionRelevant.Additions
+                            && liveRegionRelevant[1] === DOMAgent.LiveRegionRelevant.Removals
+                            && liveRegionRelevant[2] === DOMAgent.LiveRegionRelevant.Text)
+                            liveRegionRelevant = [WebInspector.UIString("All Changes")];
+                        else {
+                            // Reassign localized strings in place: ["additions","text"] becomes ["Additions","Text"].
+                            liveRegionRelevant = liveRegionRelevant.map(function(value) {
+                                switch (value) {
+                                case DOMAgent.LiveRegionRelevant.Additions:
+                                    return WebInspector.UIString("Additions");
+                                case DOMAgent.LiveRegionRelevant.Removals:
+                                    return WebInspector.UIString("Removals");
+                                case DOMAgent.LiveRegionRelevant.Text:
+                                    return WebInspector.UIString("Text");
+                                default: // If WebCore sends a new unhandled value, display as a String.
+                                    return "\"" + value + "\"";
+                                }
+                            });
+                        }
+                        liveRegionStatus += " (" + liveRegionRelevant.join(", ") + ")";
+                    }
+                    // Clarify @aria-atomic if necessary.
+                    if (accessibilityProperties.liveRegionAtomic) {
+                        liveRegionStatusNode = document.createElement("div");
+                        liveRegionStatusNode.className = "value-with-clarification";
+                        liveRegionStatusNode.setAttribute("role", "text");
+                        liveRegionStatusNode.appendChild(document.createTextNode(liveRegionStatus));
+                        var clarificationNode = document.createElement("div");
+                        clarificationNode.className = "clarification";
+                        clarificationNode.appendChild(document.createTextNode(WebInspector.UIString("Region announced in its entirety.")));
+                        liveRegionStatusNode.appendChild(clarificationNode);
+                    }
                 }
 
                 var mouseEventNodeId = accessibilityProperties.mouseEventNodeId;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to