WAI-ARIA: aria-activedescendant doesn't work as intended
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Dec 2009 07:50:48 +0000 (07:50 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Dec 2009 07:50:48 +0000 (07:50 +0000)
commit15e7cc9390435b04e36e205dc97173aaf537210b
tree43025adea78533f74af085390f606e3f530b2239
parent45262110da29628928d9fb673cd9d565c3cb599d
WAI-ARIA: aria-activedescendant doesn't work as intended
https://bugs.webkit.org/show_bug.cgi?id=32100

Reviewed by Beth Dakin.

WebCore:

Fixes a number of issues regarding the "tree" role and aria-activedescendant.
1. The indexes were being reported incorrectly by treeitems.
2. aria-activedescendant changes were not being sent to the containing item.
3. The tree's selected rows need to consult aria-activedescendant.
4. Since a tree changes what it returns as its children (it returns its rows)
   the mac-specific array indexing methods need to correctly handle the tree case.

Tests: platform/mac/accessibility/aria-tree-activedescendant.html
       platform/mac/accessibility/aria-tree-index-of-items.html

* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant):
(WebCore::AccessibilityRenderObject::activeDescendant):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
(WebCore::AccessibilityRenderObject::ariaTreeSelectedRows):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/mac/AccessibilityObjectWrapper.mm:
(-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[AccessibilityObjectWrapper accessibilityIndexOfChild:]):
(-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
* accessibility/win/AXObjectCacheWin.cpp:
(WebCore::AXObjectCache::postPlatformNotification):

LayoutTests:

* platform/mac/accessibility/aria-tree-activedescendant-expected.txt: Added.
* platform/mac/accessibility/aria-tree-activedescendant.html: Added.
* platform/mac/accessibility/aria-tree-index-of-items-expected.txt: Added.
* platform/mac/accessibility/aria-tree-index-of-items.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/aria-tree-activedescendant-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/aria-tree-activedescendant.html [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/aria-tree-index-of-items-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/aria-tree-index-of-items.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/accessibility/AXObjectCache.h
WebCore/accessibility/AccessibilityRenderObject.cpp
WebCore/accessibility/mac/AXObjectCacheMac.mm
WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
WebCore/accessibility/win/AXObjectCacheWin.cpp