AX: elements with explicit tabindex should expose AXFocused as writable, since mouse...
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Oct 2013 16:40:08 +0000 (16:40 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Oct 2013 16:40:08 +0000 (16:40 +0000)
commit9dbd99f7f107035c7d34f76ead3781dbb69ece77
treed46592d315a7cebd57f42c75ef4329d9cd72827f
parentc0395793912d5f22184d6d2fe7d05c3e0bd9e699
AX: elements with explicit tabindex should expose AXFocused as writable, since mouse clicks can focus it
https://bugs.webkit.org/show_bug.cgi?id=121335

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Re-order logic that determines if a <span> should appear as an accessible element.
The change is that if an element canSetFocus() it should always be in the AX tree.

Test: accessibility/tabindex-elements-are-accessible.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

LayoutTests:

* accessibility/tabindex-elements-are-accessible-expected.txt: Added.
* accessibility/tabindex-elements-are-accessible.html: Added.
      New test to ensure that if tabindex is on an element, it is in the AX tree.
* platform/mac/accessibility/table-with-row-col-of-headers-expected.txt:
* platform/mac/accessibility/table-with-row-col-of-headers.html:
      Update to reflect that if an ignored <table> has a tabindex, then it should at least be an AXGroup
* platform/mac/accessibility/update-children-when-aria-role-changes.html:
      Update so that the <span> elements being used don't have tabindex, which forces them to be in the AX tree,
      which changes the output of the test (basically we'd need to query the child of those elements instead).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/tabindex-elements-are-accessible-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/tabindex-elements-are-accessible.html [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/table-with-row-col-of-headers-expected.txt
LayoutTests/platform/mac/accessibility/table-with-row-col-of-headers.html
LayoutTests/platform/mac/accessibility/update-children-when-aria-role-changes.html
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp