Changeset 189642 in webkit
- Timestamp:
- Sep 11, 2015 5:47:20 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r189638 r189642 1 2015-09-11 Nan Wang <n_wang@apple.com> 2 3 AX: ARIA 1.1 @aria-current 4 https://bugs.webkit.org/show_bug.cgi?id=146012 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/aria-current-expected.txt: Added. 9 * accessibility/aria-current.html: Added. 10 * inspector/dom/getAccessibilityPropertiesForNode_ariaCurrent-expected.txt: Added. 11 * inspector/dom/getAccessibilityPropertiesForNode_ariaCurrent.html: Added. 12 * platform/gtk/TestExpectations: 13 * platform/win/TestExpectations: 14 1 15 2015-09-11 Alexey Proskuryakov <ap@apple.com> 2 16 -
trunk/LayoutTests/platform/gtk/TestExpectations
r189566 r189642 613 613 webkit.org/b/146731 fast/hidpi/filters-multiple.html [ ImageOnlyFailure ] 614 614 webkit.org/b/146731 fast/hidpi/filters-reference.html [ ImageOnlyFailure ] 615 616 webkit.org/b/149016 accessibility/aria-current.html [ Skip ] 615 617 616 618 #//////////////////////////////////////////////////////////////////////////////////////// -
trunk/LayoutTests/platform/win/TestExpectations
r189631 r189642 618 618 animations/trigger-container-scroll-simple.html [ Skip ] 619 619 animations/trigger-container-scroll-boundaries.html [ Skip ] 620 621 # TODO aria-current is not supported 622 webkit.org/b/149018 accessibility/aria-current.html [ Skip ] 620 623 621 624 ################################################################################ -
trunk/Source/JavaScriptCore/ChangeLog
r189624 r189642 1 2015-09-11 Nan Wang <n_wang@apple.com> 2 3 AX: ARIA 1.1 @aria-current 4 https://bugs.webkit.org/show_bug.cgi?id=146012 5 6 Reviewed by Chris Fleizach. 7 8 Updated inspector to support aria-current. 9 10 * inspector/protocol/DOM.json: 11 1 12 2015-09-11 Sukolsak Sakshuwong <sukolsak@gmail.com> 2 13 -
trunk/Source/JavaScriptCore/inspector/protocol/DOM.json
r187496 r189642 81 81 { "name": "childNodeIds", "type": "array", "items": { "$ref": "NodeId" }, "optional": true, "description": "Array of <code>DOMNode</code> ids of the accessibility tree children if available." }, 82 82 { "name": "controlledNodeIds", "type": "array", "items": { "$ref": "NodeId" }, "optional": true, "description": "Array of <code>DOMNode</code> ids of any nodes referenced via @aria-controls." }, 83 { "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." }, 83 84 { "name": "disabled", "type": "boolean", "optional": true, "description": "Disabled state of form controls." }, 84 85 { "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." }, -
trunk/Source/WebCore/ChangeLog
r189632 r189642 1 2015-09-11 Nan Wang <n_wang@apple.com> 2 3 AX: ARIA 1.1 @aria-current 4 https://bugs.webkit.org/show_bug.cgi?id=146012 5 6 Reviewed by Chris Fleizach. 7 8 Tests: accessibility/aria-current.html 9 inspector/dom/getAccessibilityPropertiesForNode_ariaCurrent.html 10 11 Added support for ARIA 1.1 aria-current. 12 13 * accessibility/AccessibilityObject.cpp: 14 (WebCore::AccessibilityObject::invalidStatus): 15 (WebCore::AccessibilityObject::ariaCurrentState): 16 (WebCore::AccessibilityObject::hasTagName): 17 * accessibility/AccessibilityObject.h: 18 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 19 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]): 20 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): 21 * html/HTMLAttributeNames.in: 22 * inspector/InspectorDOMAgent.cpp: 23 (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): 24 1 25 2015-09-11 Chris Dumez <cdumez@apple.com> 2 26 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r189182 r189642 1821 1821 } 1822 1822 1823 AccessibilityARIACurrentState AccessibilityObject::ariaCurrentState() const 1824 { 1825 // aria-current can return false (default), true, page, step, location, date or time. 1826 String currentStateValue = stripLeadingAndTrailingHTMLSpaces(getAttribute(aria_currentAttr)); 1827 1828 // If "false", empty, or missing, return false state. 1829 if (currentStateValue.isEmpty() || currentStateValue == "false") 1830 return ARIACurrentFalse; 1831 1832 if (currentStateValue == "page") 1833 return ARIACurrentPage; 1834 if (currentStateValue == "step") 1835 return ARIACurrentStep; 1836 if (currentStateValue == "location") 1837 return ARIACurrentLocation; 1838 if (currentStateValue == "date") 1839 return ARIACurrentDate; 1840 if (currentStateValue == "time") 1841 return ARIACurrentTime; 1842 1843 // Any value not included in the list of allowed values should be treated as "true". 1844 return ARIACurrentTrue; 1845 } 1846 1823 1847 bool AccessibilityObject::hasTagName(const QualifiedName& tagName) const 1824 1848 { -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r187582 r189642 437 437 enum AccessibilityMathMultiscriptObjectType { PreSubscript, PreSuperscript, PostSubscript, PostSuperscript }; 438 438 439 enum AccessibilityARIACurrentState { ARIACurrentFalse, ARIACurrentTrue, ARIACurrentPage, ARIACurrentStep, ARIACurrentLocation, ARIACurrentDate, ARIACurrentTime }; 440 439 441 class AccessibilityObject : public RefCounted<AccessibilityObject> { 440 442 protected: … … 624 626 void classList(Vector<String>&) const; 625 627 const AtomicString& roleDescription() const; 628 AccessibilityARIACurrentState ariaCurrentState() const; 626 629 627 630 bool supportsARIASetSize() const; -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r189598 r189642 248 248 #define NSAccessibilityDOMIdentifierAttribute @"AXDOMIdentifier" 249 249 #define NSAccessibilityDOMClassListAttribute @"AXDOMClassList" 250 251 #ifndef NSAccessibilityARIACurrentAttribute 252 #define NSAccessibilityARIACurrentAttribute @"AXARIACurrent" 253 #endif 250 254 251 255 // Search … … 1696 1700 if ([additionalAttributes count]) 1697 1701 objectAttributes = [objectAttributes arrayByAddingObjectsFromArray:additionalAttributes]; 1702 1703 // Only expose AXARIACurrent attribute when the element is set to be current item. 1704 if (m_object->ariaCurrentState() != ARIACurrentFalse) 1705 [objectAttributes arrayByAddingObjectsFromArray:@[ NSAccessibilityARIACurrentAttribute ]]; 1698 1706 1699 1707 return objectAttributes; … … 2871 2879 return [NSNumber numberWithBool:m_object->isSelected()]; 2872 2880 2881 if ([attributeName isEqualToString: NSAccessibilityARIACurrentAttribute]) { 2882 switch (m_object->ariaCurrentState()) { 2883 case ARIACurrentFalse: 2884 return @"false"; 2885 case ARIACurrentPage: 2886 return @"page"; 2887 case ARIACurrentStep: 2888 return @"step"; 2889 case ARIACurrentLocation: 2890 return @"location"; 2891 case ARIACurrentTime: 2892 return @"time"; 2893 case ARIACurrentDate: 2894 return @"date"; 2895 default: 2896 case ARIACurrentTrue: 2897 return @"true"; 2898 } 2899 } 2900 2873 2901 if ([attributeName isEqualToString: NSAccessibilityServesAsTitleForUIElementsAttribute] && m_object->isMenuButton()) { 2874 2902 AccessibilityObject* uiElement = downcast<AccessibilityRenderObject>(*m_object).menuForMenuButton(); -
trunk/Source/WebCore/html/HTMLAttributeNames.in
r186038 r189642 19 19 aria-checked 20 20 aria-controls 21 aria-current 21 22 aria-describedby 22 23 aria-disabled -
trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp
r189438 r189642 1524 1524 RefPtr<Inspector::Protocol::Array<int>> childNodeIds; 1525 1525 RefPtr<Inspector::Protocol::Array<int>> controlledNodeIds; 1526 auto currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::False; 1526 1527 bool exists = false; 1527 1528 bool expanded = false; … … 1588 1589 } 1589 1590 } 1591 1592 switch (axObject->ariaCurrentState()) { 1593 case ARIACurrentFalse: 1594 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::False; 1595 break; 1596 case ARIACurrentPage: 1597 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Page; 1598 break; 1599 case ARIACurrentStep: 1600 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Step; 1601 break; 1602 case ARIACurrentLocation: 1603 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Location; 1604 break; 1605 case ARIACurrentDate: 1606 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Date; 1607 break; 1608 case ARIACurrentTime: 1609 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Time; 1610 break; 1611 default: 1612 case ARIACurrentTrue: 1613 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::True; 1614 break; 1615 } 1590 1616 1591 1617 disabled = !axObject->isEnabled(); … … 1725 1751 if (controlledNodeIds) 1726 1752 value->setControlledNodeIds(controlledNodeIds); 1753 if (currentState != Inspector::Protocol::DOM::AccessibilityProperties::Current::False) 1754 value->setCurrent(currentState); 1727 1755 if (disabled) 1728 1756 value->setDisabled(disabled); -
trunk/Source/WebInspectorUI/ChangeLog
r189593 r189642 1 2015-09-11 Nan Wang <n_wang@apple.com> 2 3 AX: ARIA 1.1 @aria-current 4 https://bugs.webkit.org/show_bug.cgi?id=146012 5 6 Reviewed by Chris Fleizach. 7 8 Added support for ARIA 1.1 aria-current. 9 10 * Localizations/en.lproj/localizedStrings.js: 11 * UserInterface/Models/DOMNode.js: 12 * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: 13 1 14 2015-09-10 Devin Rousso <dcrousso+webkit@gmail.com> 2 15 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r189236 r189642 163 163 localizedStrings["Could not fetch properties. Object may no longer exist."] = "Could not fetch properties. Object may no longer exist."; 164 164 localizedStrings["Create a new tab"] = "Create a new tab"; 165 localizedStrings["Current"] = "Current"; 165 166 localizedStrings["Cursor"] = "Cursor"; 166 167 localizedStrings["Custom"] = "Custom"; … … 169 170 localizedStrings["Database no longer has expected version."] = "Database no longer has expected version."; 170 171 localizedStrings["Databases"] = "Databases"; 172 localizedStrings["Date"] = "Date"; 171 173 localizedStrings["Debug: "] = "Debug: "; 172 174 localizedStrings["Debugger"] = "Debugger"; … … 427 429 localizedStrings["Owns"] = "Owns"; 428 430 localizedStrings["Padding"] = "Padding"; 431 localizedStrings["Page"] = "Page"; 429 432 localizedStrings["Page Issue"] = "Page Issue"; 430 433 localizedStrings["Paint"] = "Paint"; … … 550 553 localizedStrings["Start Time"] = "Start Time"; 551 554 localizedStrings["Status"] = "Status"; 555 localizedStrings["Step"] = "Step"; 552 556 localizedStrings["Step into (%s or %s)"] = "Step into (%s or %s)"; 553 557 localizedStrings["Step out (%s or %s)"] = "Step out (%s or %s)"; … … 578 582 localizedStrings["This Element"] = "This Element"; 579 583 localizedStrings["This property needs a value.\nClick to open autocomplete."] = "This property needs a value.\nClick to open autocomplete."; 584 localizedStrings["Time"] = "Time"; 580 585 localizedStrings["Time until the load event fired, click to show the Network Requests timeline"] = "Time until the load event fired, click to show the Network Requests timeline"; 581 586 localizedStrings["Timeline Events"] = "Timeline Events"; … … 597 602 localizedStrings["Transition"] = "Transition"; 598 603 localizedStrings["Triggered Breakpoint"] = "Triggered Breakpoint"; 604 localizedStrings["True"] = "True"; 599 605 localizedStrings["Type"] = "Type"; 600 606 localizedStrings["Type Issue"] = "Type Issue"; -
trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js
r189104 r189642 427 427 childNodeIds: accessibilityProperties.childNodeIds, 428 428 controlledNodeIds: accessibilityProperties.controlledNodeIds, 429 current: accessibilityProperties.current, 429 430 disabled: accessibilityProperties.disabled, 430 431 exists: accessibilityProperties.exists, -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js
r187402 r189642 68 68 this._accessibilityNodeChildrenRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Children")); 69 69 this._accessibilityNodeControlsRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Controls")); 70 this._accessibilityNodeCurrentRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Current")); 70 71 this._accessibilityNodeDisabledRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Disabled")); 71 72 this._accessibilityNodeExpandedRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Expanded")); … … 347 348 348 349 var controlledNodeLinkList = linkListForNodeIds(accessibilityProperties.controlledNodeIds); 350 351 var current = ""; 352 switch (accessibilityProperties.current) { 353 case DOMAgent.AccessibilityPropertiesCurrent.True: 354 current = WebInspector.UIString("True"); 355 break; 356 case DOMAgent.AccessibilityPropertiesCurrent.Page: 357 current = WebInspector.UIString("Page"); 358 break; 359 case DOMAgent.AccessibilityPropertiesCurrent.Location: 360 current = WebInspector.UIString("Location"); 361 break; 362 case DOMAgent.AccessibilityPropertiesCurrent.Step: 363 current = WebInspector.UIString("Step"); 364 break; 365 case DOMAgent.AccessibilityPropertiesCurrent.Date: 366 current = WebInspector.UIString("Date"); 367 break; 368 case DOMAgent.AccessibilityPropertiesCurrent.Time: 369 current = WebInspector.UIString("Time"); 370 break; 371 default: 372 current = ""; 373 } 374 349 375 var disabled = booleanValueToLocalizedStringIfTrue("disabled"); 350 376 var expanded = booleanValueToLocalizedStringIfPropertyDefined("expanded"); … … 463 489 this._accessibilityNodeChildrenRow.value = childNodeLinkList || ""; 464 490 this._accessibilityNodeControlsRow.value = controlledNodeLinkList || ""; 491 this._accessibilityNodeCurrentRow.value = current; 465 492 this._accessibilityNodeDisabledRow.value = disabled; 466 493 this._accessibilityNodeExpandedRow.value = expanded; … … 506 533 this._accessibilityNodeBusyRow, 507 534 this._accessibilityNodeLiveRegionStatusRow, 535 this._accessibilityNodeCurrentRow, 508 536 509 537 // Properties exposed for all input-type elements.
Note: See TracChangeset
for help on using the changeset viewer.