Changeset 207553 in webkit
- Timestamp:
- Oct 19, 2016 11:59:23 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207547 r207553 1 2016-10-19 Aaron Chu <aaron_chu@apple.com> 2 3 Web Inspector: AXI: expose computed tree node and heading level 4 https://bugs.webkit.org/show_bug.cgi?id=130825 5 <rdar://problem/16442349> 6 7 Reviewed by Joseph Pecoraro. 8 9 Included logging of the two newly exposed accessibility properties: 10 Heading Level and Hierarchical Level. 11 12 * inspector/dom/getAccessibilityPropertiesForNode-expected.txt: 13 * inspector/dom/getAccessibilityPropertiesForNode.html: 14 1 15 2016-10-19 Zalan Bujtas <zalan@apple.com> 2 16 -
trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt
r200698 r207553 5 5 label: 6 6 role: 7 childNodeIds.length: 438 9 10 Total elements to be tested: 65.7 childNodeIds.length: 52 8 9 10 Total elements to be tested: 81. 11 11 12 12 <div onclick="void(0);">click</div> … … 18 18 parentNodeId: exists 19 19 20 <li role="treeitem">Tree Item Level 2</li> 21 exists: true 22 label: 23 role: treeitem 24 childNodeIds.length: 1 25 parentNodeId: exists 26 hierarchyLevel: 2 27 28 <ul> 29 <li role="treeitem">Tree Item Level 2</li> 30 </ul> 31 exists: true 32 label: 33 role: group 34 childNodeIds.length: 1 35 parentNodeId: exists 36 37 <li role="treeitem"> 38 <span>Tree Item Level 1</span> 39 <ul> 40 <li role="treeitem">Tree Item Level 2</li> 41 </ul> 42 </li> 43 exists: true 44 label: 45 role: treeitem 46 childNodeIds.length: 2 47 parentNodeId: exists 48 hierarchyLevel: 1 49 50 <ul role="tree"> 51 <li role="treeitem"> 52 <span>Tree Item Level 1</span> 53 <ul> 54 <li role="treeitem">Tree Item Level 2</li> 55 </ul> 56 </li> 57 </ul> 58 exists: true 59 label: 60 role: tree 61 childNodeIds.length: 1 62 parentNodeId: exists 63 64 <li aria-level="1">List Item Level 1</li> 65 exists: true 66 label: 67 role: listitem 68 childNodeIds.length: 1 69 parentNodeId: exists 70 hierarchyLevel: 1 71 72 <li aria-level="2">List Item Level 2</li> 73 exists: true 74 label: 75 role: listitem 76 childNodeIds.length: 1 77 parentNodeId: exists 78 hierarchyLevel: 2 79 80 <ol> 81 <li aria-level="2">List Item Level 2</li> 82 </ol> 83 exists: true 84 label: 85 role: list 86 childNodeIds.length: 1 87 parentNodeId: exists 88 89 <li aria-level="1"> 90 <span>List Item Level 1</span> 91 <ol> 92 <li aria-level="2">List Item Level 2</li> 93 </ol> 94 </li> 95 exists: true 96 label: 97 role: listitem 98 childNodeIds.length: 2 99 parentNodeId: exists 100 hierarchyLevel: 1 101 102 <ul> 103 <li aria-level="1"> 104 <span>List Item Level 1</span> 105 <ol> 106 <li aria-level="2">List Item Level 2</li> 107 </ol> 108 </li> 109 <li aria-level="1">List Item Level 1</li> 110 </ul> 111 exists: true 112 label: 113 role: list 114 childNodeIds.length: 2 115 parentNodeId: exists 116 117 <h1 style="color: red;" aria-level="8">H1</h1> 118 exists: true 119 label: H1 120 role: heading 121 childNodeIds.length: 1 122 parentNodeId: exists 123 headingLevel: 8 124 125 <h6>H6</h6> 126 exists: true 127 label: H6 128 role: heading 129 childNodeIds.length: 1 130 parentNodeId: exists 131 headingLevel: 6 132 133 <h5>H5</h5> 134 exists: true 135 label: H5 136 role: heading 137 childNodeIds.length: 1 138 parentNodeId: exists 139 headingLevel: 5 140 141 <h4>H4</h4> 142 exists: true 143 label: H4 144 role: heading 145 childNodeIds.length: 1 146 parentNodeId: exists 147 headingLevel: 4 148 149 <h3>H3</h3> 150 exists: true 151 label: H3 152 role: heading 153 childNodeIds.length: 1 154 parentNodeId: exists 155 headingLevel: 3 156 157 <h2>H2</h2> 158 exists: true 159 label: H2 160 role: heading 161 childNodeIds.length: 1 162 parentNodeId: exists 163 headingLevel: 2 164 165 <h1>H1</h1> 166 exists: true 167 label: H1 168 role: heading 169 childNodeIds.length: 1 170 parentNodeId: exists 171 headingLevel: 1 172 20 173 <li role="treeitem" aria-expanded="undefined">expanded</li> 21 174 exists: true … … 24 177 childNodeIds.length: 1 25 178 parentNodeId: exists 179 hierarchyLevel: 1 26 180 27 181 <li role="treeitem" aria-expanded="false" id="activedescendant" aria-selected="true">collapsed</li> … … 33 187 parentNodeId: exists 34 188 selected: true 189 hierarchyLevel: 1 35 190 36 191 <li role="treeitem" aria-expanded="true">expanded</li> … … 41 196 expanded: true 42 197 parentNodeId: exists 198 hierarchyLevel: 1 43 199 44 200 <ul role="tree" id="flowedTo1" aria-activedescendant="activedescendant"> -
trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html
r188267 r207553 118 118 <li class="ex" role="treeitem" aria-expanded="undefined">expanded</li> 119 119 </ul> 120 121 <div> 122 <h1 class="ex">H1</h1> 123 <h2 class="ex">H2</h2> 124 <h3 class="ex">H3</h3> 125 <h4 class="ex">H4</h4> 126 <h5 class="ex">H5</h5> 127 <h6 class="ex">H6</h6> 128 129 <h1 class="ex" style="color: red;" aria-level="8">H1</h1> 130 131 <ul class="ex"> 132 <li class="ex" aria-level="1"> 133 <span>List Item Level 1</span> 134 <ol class="ex"> 135 <li class="ex" aria-level="2">List Item Level 2</li> 136 </ol> 137 </li> 138 <li class="ex" aria-level="1">List Item Level 1</li> 139 </ul> 140 141 <ul class="ex" role="tree"> 142 <li class="ex" role="treeitem"> 143 <span>Tree Item Level 1</span> 144 <ul class="ex"> 145 <li class="ex" role="treeitem">Tree Item Level 2</li> 146 </ul> 147 </li> 148 </ul> 149 150 </div> 120 151 121 152 <!-- Full test of mouseEventNodeId in getAccessibilityPropertiesForNode_mouseEventNodeId.html. --> -
trunk/Source/JavaScriptCore/ChangeLog
r207545 r207553 1 2016-10-19 Aaron Chu <aaron_chu@apple.com> 2 3 Web Inspector: AXI: expose computed tree node and heading level 4 https://bugs.webkit.org/show_bug.cgi?id=130825 5 <rdar://problem/16442349> 6 7 Reviewed by Joseph Pecoraro. 8 9 Exposing two new accessibility properties: Heading Level and Hierarchical Level. 10 11 * inspector/protocol/DOM.json: 12 1 13 2016-10-18 Filip Pizlo <fpizlo@apple.com> 2 14 -
trunk/Source/JavaScriptCore/inspector/protocol/DOM.json
r204114 r207553 90 90 { "name": "current", "type": "string", "optional": true, "enum": ["true", "false", "page", "step", "location", "date", "time"], "description": "Current item within a container or set of related elements." }, 91 91 { "name": "disabled", "type": "boolean", "optional": true, "description": "Disabled state of form controls." }, 92 { "name": "headingLevel", "type": "number", "optional": true, "description": "Heading level of a heading element." }, 93 { "name": "hierarchyLevel", "type": "number", "optional": true, "description": "The hierarchical level of an element." }, 92 94 { "name": "exists", "type": "boolean", "description": "Indicates whether there is an existing AX object for the DOM node. If this is false, all the other properties will be default values." }, 93 95 { "name": "expanded", "type": "boolean", "optional": true, "description": "Expanded state." }, -
trunk/Source/WebCore/ChangeLog
r207552 r207553 1 2016-10-19 Aaron Chu <aaron_chu@apple.com> 2 3 Web Inspector: AXI: expose computed tree node and heading level 4 https://bugs.webkit.org/show_bug.cgi?id=130825 5 <rdar://problem/16442349> 6 7 Reviewed by Joseph Pecoraro. 8 9 Exposing two new accessibility properties: Heading Level and Hierarchical Level. 10 11 Updated Test: LayoutTest/inspector/dom/getAccessibilityPropertiesForNode.html 12 13 * inspector/InspectorDOMAgent.cpp: 14 (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): 15 1 16 2016-10-19 Adam Bergkvist <adam.bergkvist@ericsson.com> 2 17 -
trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp
r207496 r207553 1600 1600 bool supportsRequired = false; 1601 1601 bool supportsFocused = false; 1602 int headingLevel = 0; 1603 unsigned hierarchicalLevel = 0; 1604 unsigned level = 0; 1602 1605 1603 1606 if (AXObjectCache* axObjectCache = node->document().axObjectCache()) { … … 1773 1776 } 1774 1777 } 1778 1779 headingLevel = axObject->headingLevel(); 1780 hierarchicalLevel = axObject->hierarchicalLevel(); 1781 1782 level = hierarchicalLevel ? hierarchicalLevel : headingLevel; 1775 1783 } 1776 1784 } … … 1834 1842 if (selectedChildNodeIds) 1835 1843 value->setSelectedChildNodeIds(selectedChildNodeIds); 1844 1845 // H1 -- H6 always have a headingLevel property that can be complimented by a hierarchicalLevel 1846 // property when aria-level is set on the element, in which case we want to remain calling 1847 // this value the "Heading Level" in the inspector. 1848 // Also, we do not want it to say Hierarchy Level: 0 1849 if (headingLevel) 1850 value->setHeadingLevel(level); 1851 else if (level) 1852 value->setHierarchyLevel(level); 1836 1853 } 1837 1854 -
trunk/Source/WebInspectorUI/ChangeLog
r207489 r207553 1 2016-10-19 Aaron Chu <aaron_chu@apple.com> 2 3 Web Inspector: AXI: expose computed tree node and heading level 4 https://bugs.webkit.org/show_bug.cgi?id=130825 5 <rdar://problem/16442349> 6 7 Reviewed by Joseph Pecoraro. 8 9 Updating the Web Accessibility Inspector to display Heading Level and Hierarchical Level. 10 11 * Localizations/en.lproj/localizedStrings.js: 12 * UserInterface/Models/DOMNode.js: 13 (WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback): 14 (WebInspector.DOMNode.prototype.accessibilityProperties): 15 * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: 16 (WebInspector.DOMNodeDetailsSidebarPanel): 17 (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback): 18 (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility): 19 1 20 2016-10-18 Joseph Pecoraro <pecoraro@apple.com> 2 21 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r207444 r207553 394 394 localizedStrings["Heap Snapshot Object (@%d)"] = "Heap Snapshot Object (@%d)"; 395 395 localizedStrings["Height"] = "Height"; 396 localizedStrings["Heading Level"] = "Heading Level"; 397 localizedStrings["Hierarchy Level"] = "Hierarchy Level"; 396 398 localizedStrings["Hide compositing borders"] = "Hide compositing borders"; 397 399 localizedStrings["Hide shadow DOM nodes"] = "Hide shadow DOM nodes"; -
trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js
r206008 r207553 518 518 ignoredByDefault: accessibilityProperties.ignoredByDefault, 519 519 invalid: accessibilityProperties.invalid, 520 headingLevel: accessibilityProperties.headingLevel, 521 hierarchyLevel: accessibilityProperties.hierarchyLevel, 520 522 hidden: accessibilityProperties.hidden, 521 523 label: accessibilityProperties.label, -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js
r205425 r207553 74 74 this._accessibilityNodeFlowsRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Flows")); 75 75 this._accessibilityNodeFocusedRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Focused")); 76 this._accessibilityNodeHeadingLevelRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Heading Level")); 77 this._accessibilityNodehierarchyLevelRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Hierarchy Level")); 76 78 this._accessibilityNodeIgnoredRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Ignored")); 77 79 this._accessibilityNodeInvalidRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Invalid")); … … 502 504 var selectedChildNodeLinkList = linkListForNodeIds(accessibilityProperties.selectedChildNodeIds); 503 505 506 var headingLevel = accessibilityProperties.headingLevel; 507 var hierarchyLevel = accessibilityProperties.hierarchyLevel; 504 508 // Assign all the properties to their respective views. 505 509 this._accessibilityNodeActiveDescendantRow.value = activeDescendantLink || ""; … … 513 517 this._accessibilityNodeFlowsRow.value = flowedNodeLinkList || ""; 514 518 this._accessibilityNodeFocusedRow.value = focused; 519 this._accessibilityNodeHeadingLevelRow.value = headingLevel || ""; 520 this._accessibilityNodehierarchyLevelRow.value = hierarchyLevel || ""; 515 521 this._accessibilityNodeIgnoredRow.value = ignored; 516 522 this._accessibilityNodeInvalidRow.value = invalid; … … 550 556 this._accessibilityNodeMouseEventRow, 551 557 this._accessibilityNodeFocusedRow, 558 this._accessibilityNodeHeadingLevelRow, 559 this._accessibilityNodehierarchyLevelRow, 552 560 this._accessibilityNodeBusyRow, 553 561 this._accessibilityNodeLiveRegionStatusRow,
Note: See TracChangeset
for help on using the changeset viewer.