AX: AOM: More accessibility events support
authorn_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Mar 2018 08:18:53 +0000 (08:18 +0000)
committern_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Mar 2018 08:18:53 +0000 (08:18 +0000)
commit8d1ab7b714f65127087563fdaeac5efa3455b00c
treea49315a8ac6560ecac627578ffc1c0e55ed85c4c
parent2710644d2a250724fc0e9192213eb83ba3443731
AX: AOM: More accessibility events support
https://bugs.webkit.org/show_bug.cgi?id=183023
<rdar://problem/37764380>

Reviewed by Chris Fleizach.

Source/WebCore:

Accessibility events.
Spec: https://wicg.github.io/aom/spec/phase2.html

This change adds support for these new events:
  accessiblecontextmenu
  accessibledecrement
  accessibledismiss
  accessiblefocus
  accessibleincrement
  accessiblescrollintoview
  accessibleselect

Note: The show context menu action is only supported on macOS now.
The dismiss action is not implemented for all the platforms yet.

Test: accessibility/mac/AOM-events-all.html

* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::setSelected):
* accessibility/AccessibilityMediaObject.cpp:
(WebCore::AccessibilityMediaObject::increment):
(WebCore::AccessibilityMediaObject::decrement):
* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::setSelected):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::increment):
(WebCore::AccessibilityNodeObject::decrement):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
(WebCore::AccessibilityObject::dispatchAccessibilityEvent const):
(WebCore::AccessibilityObject::dispatchAccessibilityEventWithType const):
(WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent const):
(WebCore::AccessibilityObject::scrollToMakeVisible const):
(WebCore::AccessibilityObject::dispatchAccessibilityEvent): Deleted.
(WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent): Deleted.
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setFocused):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
* dom/Element.idl:
* dom/EventNames.h:

LayoutTests:

* accessibility/mac/AOM-events-all-expected.txt: Added.
* accessibility/mac/AOM-events-all.html: Added.
* js/dom/dom-static-property-for-in-iteration-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/mac/AOM-events-all-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/mac/AOM-events-all.html [new file with mode: 0644]
LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt
LayoutTests/platform/mac-wk1/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityListBoxOption.cpp
Source/WebCore/accessibility/AccessibilityMediaObject.cpp
Source/WebCore/accessibility/AccessibilityMenuListOption.cpp
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebCore/dom/Element.idl
Source/WebCore/dom/EventNames.h