Web Inspector: AXI: clarify button roles (e.g. toggle or popup button)
https://bugs.webkit.org/show_bug.cgi?id=130726
<rdar://problem/16420420>

Patch by Aaron Chu <aaron_chu@apple.com> on 2016-11-10
Reviewed by Brian Burg.

Source/JavaScriptCore:

Add the isPopupButton flag to the AccessibilityProperties type.

* inspector/protocol/DOM.json:

Source/WebCore:

Test: accessibility/ax-differentiate-button-types.html

Added special case logic to make sure PopUpButtonRole and ToggleButtonRole to user ButtonRole as role.
Added an "isPopUpButton" property to be exposed to the Inspector's use.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::computedRoleString):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

Source/WebInspectorUI:

Updated Inspector to show the button type using the new mapping information.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback):
(WebInspector.DOMNode.prototype.accessibilityProperties):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):

LayoutTests:

Updated related test cases.

* accessibility/roles-computedRoleString-expected.txt:
* accessibility/roles-computedRoleString.html:
* inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
* inspector/dom/getAccessibilityPropertiesForNode.html:
* platform/mac/accessibility/roles-computedRoleString-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@208540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed