https://bugs.webkit.org/show_bug.cgi?id=130827
Patch by James Craig <jcraig@apple.com> on 2014-03-27
Reviewed by Timothy Hatcher.
Source/WebCore:
Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
Support for selectedChildNodeIds in inspector-protocol: DOM.getAccessibilityPropertiesForNode.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/protocol/DOM.json:
Source/WebInspectorUI:
UI updates for "Selected Item(s)" and "Child(ren)" rows in accessibility node inspector.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNode.js:
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
Websites/webkit.org:
Updated demo files with attr refresh to show off selected children changing.
Long term fix will be http://webkit.org/b/130883
* blog-files/aria1.0/combobox_with_live_region_status.html:
LayoutTests:
Tests selectedChildNodeIds in inspector-protocol: DOM.getAccessibilityPropertiesForNode.
* inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:
* inspector-protocol/dom/getAccessibilityPropertiesForNode.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166398
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-03-27 James Craig <jcraig@apple.com>
+
+ Web Inspector: AXI: expose selectedChildNodeIds of list boxes, tree controls, etc., and reconcile UI with childNodeIds
+ https://bugs.webkit.org/show_bug.cgi?id=130827
+
+ Reviewed by Timothy Hatcher.
+
+ Tests selectedChildNodeIds in inspector-protocol: DOM.getAccessibilityPropertiesForNode.
+
+ * inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:
+ * inspector-protocol/dom/getAccessibilityPropertiesForNode.html:
+
2014-03-27 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/42704> WebKitTestRunner needs to print history delegate information
exists: true
label:
role:
- childNodeIds.length: 19
+ childNodeIds.length: 20
-Total elements to be tested: 57.
+Total elements to be tested: 58.
<li role="treeitem" aria-expanded="undefined">expanded</li>
exists: true
childNodeIds.length: 1
parentNodeId: exists
-<li role="treeitem" aria-expanded="false" id="activedescendant">collapsed</li>
+<li role="treeitem" aria-expanded="false" id="activedescendant" aria-selected="true">collapsed</li>
exists: true
label:
role: treeitem
childNodeIds.length: 1
expanded: false
parentNodeId: exists
+ selected: true
<li role="treeitem" aria-expanded="true">expanded</li>
exists: true
<ul role="tree" id="flowedTo1" aria-activedescendant="activedescendant">
<li role="treeitem" aria-expanded="true">expanded</li>
- <li role="treeitem" aria-expanded="false" id="activedescendant">collapsed</li>
+ <li role="treeitem" aria-expanded="false" id="activedescendant" aria-selected="true">collapsed</li>
<li role="treeitem" aria-expanded="undefined">expanded</li>
</ul>
exists: true
activeDescendantNodeId: exists
childNodeIds.length: 3
parentNodeId: exists
+ selectedChildNodeIds.length: 1
+
+<div role="listbox" aria-multiselectable="true">
+ <div role="option" aria-selected="true">selected</div>
+ <div role="option" aria-selected="false">not selected</div>
+ <div role="option" aria-selected="true">selected</div>
+</div>
+ exists: true
+ label:
+ role: listbox
+ childNodeIds.length: 3
+ parentNodeId: exists
+ required: false
+ selectedChildNodeIds.length: 2
<div role="tab" aria-selected="false">not selected</div>
exists: true
childNodeIds.length: 2
parentNodeId: exists
required: false
+ selectedChildNodeIds.length: 1
<input role="combobox" aria-owns="ownedlistbox invalidIdRef" aria-controls="ownedlistbox invalidIdRef">
exists: true
<div class="ex" role="tab" aria-selected="false">not selected</div>
</div>
+<div role="listbox" class="ex" aria-multiselectable="true">
+ <div role="option" aria-selected="true">selected</div>
+ <div role="option" aria-selected="false">not selected</div>
+ <div role="option" aria-selected="true">selected</div>
+</div>
+
<ul role="tree" class="ex" id="flowedTo1" aria-activedescendant="activedescendant">
<li class="ex" role="treeitem" aria-expanded="true">expanded</li>
- <li class="ex" role="treeitem" aria-expanded="false" id="activedescendant">collapsed</li>
+ <li class="ex" role="treeitem" aria-expanded="false" id="activedescendant" aria-selected="true">collapsed</li>
<li class="ex" role="treeitem" aria-expanded="undefined">expanded</li>
</ul>
case "controlledNodeIds":
case "flowedNodeIds":
case "ownedNodeIds":
+ case "selectedChildNodeIds":
if (typeof value === "object" && value.length)
InspectorTest.log(" " + key + ".length: " + value.length);
break;
+2014-03-27 James Craig <jcraig@apple.com>
+
+ Web Inspector: AXI: expose selectedChildNodeIds of list boxes, tree controls, etc., and reconcile UI with childNodeIds
+ https://bugs.webkit.org/show_bug.cgi?id=130827
+
+ Reviewed by Timothy Hatcher.
+
+ Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
+
+ Support for selectedChildNodeIds in inspector-protocol: DOM.getAccessibilityPropertiesForNode.
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
+ * inspector/protocol/DOM.json:
+
2014-03-27 Brent Fulgham <bfulgham@apple.com>
Specify Shadow DOM Pseudo IDs in Media Element Constructors
bool required = false;
String role;
bool selected = false;
+ RefPtr<Inspector::TypeBuilder::Array<int>> selectedChildNodeIds;
bool supportsChecked = false;
bool supportsExpanded = false;
bool supportsPressed = false;
role = axObject->computedRoleString();
selected = axObject->isSelected();
+
+ AccessibilityObject::AccessibilityChildrenVector selectedChildren;
+ axObject->selectedChildren(selectedChildren);
+ if (selectedChildren.size()) {
+ selectedChildNodeIds = Inspector::TypeBuilder::Array<int>::create();
+ for (auto& selectedChildObject : selectedChildren) {
+ if (Node* selectedChildNode = selectedChildObject->node())
+ selectedChildNodeIds->addItem(pushNodePathToFrontend(selectedChildNode));
+ }
+ }
}
}
value->setRequired(required);
if (selected)
value->setSelected(selected);
+ if (selectedChildNodeIds)
+ value->setSelectedChildNodeIds(selectedChildNodeIds);
}
return value.release();
{ "name": "readonly", "type": "boolean", "optional": true, "description": "Readonly state of text controls." },
{ "name": "required", "type": "boolean", "optional": true, "description": "Required state of form controls." },
{ "name": "role", "type": "string", "description": "Computed value for first recognized role token, default role per element, or overridden role." },
- { "name": "selected", "type": "boolean", "optional": true, "description": "Selected state of certain form controls." }
+ { "name": "selected", "type": "boolean", "optional": true, "description": "Selected state of certain form controls." },
+ { "name": "selectedChildNodeIds", "type": "array", "items": { "$ref": "NodeId" }, "optional": true, "description": "Array of <code>DOMNode</code> ids of any children marked as selected." }
]
},
{
+2014-03-27 James Craig <jcraig@apple.com>
+
+ Web Inspector: AXI: expose selectedChildNodeIds of list boxes, tree controls, etc., and reconcile UI with childNodeIds
+ https://bugs.webkit.org/show_bug.cgi?id=130827
+
+ Reviewed by Timothy Hatcher.
+
+ UI updates for "Selected Item(s)" and "Child(ren)" rows in accessibility node inspector.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Models/DOMNode.js:
+ * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
+
2014-03-27 Antoine Quint <graouts@webkit.org>
Web Inspector: clearing the console log doesn't update the activity viewer
readonly: accessibilityProperties.readonly,
required: accessibilityProperties.required,
role: accessibilityProperties.role,
- selected: accessibilityProperties.selected
+ selected: accessibilityProperties.selected,
+ selectedChildNodeIds: accessibilityProperties.selectedChildNodeIds
});
}
}
this._accessibilityNodeRequiredRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Required"));
this._accessibilityNodeRoleRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Role"));
this._accessibilityNodeSelectedRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Selected"));
+ this._accessibilityNodeSelectedChildrenRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Selected Items"));
this._accessibilityGroup = new WebInspector.DetailsSectionGroup([this._accessibilityEmptyRow]);
var accessibilitySection = new WebInspector.DetailsSection("dom-node-accessibility", WebInspector.UIString("Accessibility"), [this._accessibilityGroup]);
}
var selected = booleanValueToLocalizedStringIfTrue("selected");
+ var selectedChildNodeLinkList = linkListForNodeIds(accessibilityProperties.selectedChildNodeIds);
// Assign all the properties to their respective views.
this._accessibilityNodeActiveDescendantRow.value = activeDescendantLink || "";
this._accessibilityNodeRoleRow.value = role;
this._accessibilityNodeSelectedRow.value = selected;
+ this._accessibilityNodeSelectedChildrenRow.label = WebInspector.UIString("Selected Items");
+ this._accessibilityNodeSelectedChildrenRow.value = selectedChildNodeLinkList || "";
+ if (selectedChildNodeLinkList && accessibilityProperties.selectedChildNodeIds.length === 1)
+ this._accessibilityNodeSelectedChildrenRow.label = WebInspector.UIString("Selected Item");
+
// Display order, not alphabetical as above.
this._accessibilityGroup.rows = [
// Global properties for all elements.
this._accessibilityNodeRoleRow,
this._accessibilityNodeLabelRow,
this._accessibilityNodeParentRow,
- this._accessibilityNodeChildrenRow,
this._accessibilityNodeActiveDescendantRow,
+ this._accessibilityNodeSelectedChildrenRow,
+ this._accessibilityNodeChildrenRow,
this._accessibilityNodeOwnsRow,
this._accessibilityNodeControlsRow,
this._accessibilityNodeFlowsRow,
+2014-03-27 James Craig <jcraig@apple.com>
+
+ Web Inspector: AXI: expose selectedChildNodeIds of list boxes, tree controls, etc., and reconcile UI with childNodeIds
+ https://bugs.webkit.org/show_bug.cgi?id=130827
+
+ Reviewed by Timothy Hatcher.
+
+ Updated demo files with attr refresh to show off selected children changing.
+ Long term fix will be http://webkit.org/b/130883
+
+ * blog-files/aria1.0/combobox_with_live_region_status.html:
+
2014-03-25 James Craig <jcraig@apple.com>
Blog-files: combobox demo needs aria-expanded support
var clearSelectedOption = function (){
if (selectedOption) {
field.removeAttribute('aria-activedescendant');
+ list.removeAttribute('data-selection');
selectedOption.removeAttribute('aria-selected');
}
selectedOption = null;
}
if (selectedOption) selectedOption.removeAttribute('aria-selected');
selectedOption = el;
+ list.setAttribute('data-selection', el.id);
el.setAttribute('aria-selected', 'true');
field.setAttribute('aria-activedescendant', el.id);
};