AX: [ATK] Events missing and state incorrect for aria-activedescendant
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Oct 2017 16:30:20 +0000 (16:30 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Oct 2017 16:30:20 +0000 (16:30 +0000)
commit84cc06fabe0569e35a007b24305aa2b2817046bb
tree03ec6753d9100d02c622f3cfd3f713a2545cfc5c
parent07d948334bb8917412e2a96f157c9e542f24717e
AX: [ATK] Events missing and state incorrect for aria-activedescendant
https://bugs.webkit.org/show_bug.cgi?id=178523

Reviewed by Chris Fleizach.

Source/WebCore:

When the aria-activedescendant of an element changes, emit object:state-changed:focused.
When a focused element has a valid active descendant, do not expose the focused state on
the element, but rather on the active descendant. Also expose the focusable state on the
active descendant.

Tests: accessibility/gtk/aria-activedescendant-changed-notification.html
       accessibility/gtk/aria-activedescendant.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isActiveDescendantOfFocusedContainer const):
(WebCore::AccessibilityObject::ariaActiveDescendantReferencingElements const):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::shouldNotifyActiveDescendant const):
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkStateSetFromCoreObject):

LayoutTests:

* accessibility/gtk/aria-activedescendant-changed-notification-expected.txt: Added.
* accessibility/gtk/aria-activedescendant-changed-notification.html: Added.
* accessibility/gtk/aria-activedescendant-expected.txt: Added.
* accessibility/gtk/aria-activedescendant.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/gtk/aria-activedescendant-changed-notification-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/gtk/aria-activedescendant-changed-notification.html [new file with mode: 0644]
LayoutTests/accessibility/gtk/aria-activedescendant-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/gtk/aria-activedescendant.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp