AX: <details> element should allow expand/close through AX API
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 18:38:39 +0000 (18:38 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 18:38:39 +0000 (18:38 +0000)
commite13bd0fab4cd0adea4178dd6b01f95b52e9c81d5
treeba036e7f8eda755d7ef83b9cdd80ba0e64774603
parent73e96aa07f5d0e2b60568fab6efd8f83be8ae42d
AX: <details> element should allow expand/close through AX API
https://bugs.webkit.org/show_bug.cgi?id=146549

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Allow AXExpanded to be writeable for <details> element, which, when set
will toggle the opening and closing of the element.
Post a notification when that happens as well.

Modified test: platform/mac/accessibility/details-summary.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::hierarchicalLevel):
(WebCore::AccessibilityNodeObject::setIsExpanded):
(WebCore::shouldUseAccessibilityObjectInnerText):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsPressAction):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::canSetExpandedAttribute):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::toggleOpen):

LayoutTests:

* platform/mac/accessibility/details-summary-expected.txt:
* platform/mac/accessibility/details-summary.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/details-summary-expected.txt
LayoutTests/platform/mac/accessibility/details-summary.html
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityNodeObject.h
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm