AX: role="none" (or presentation) does not work on iframes
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Jul 2017 17:18:34 +0000 (17:18 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Jul 2017 17:18:34 +0000 (17:18 +0000)
commit9a6dc9c01fca71c0a044bda89bc1a4551068210d
tree976cfb401d79be7c1b0ab6b024f8f80432962525
parentc60864c1fc325a4001bdd806d983ebc18b4124a5
AX: role="none" (or presentation) does not work on iframes
https://bugs.webkit.org/show_bug.cgi?id=173930
<rdar://problem/33034347>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Support setting a presentational role on an iframe so that the AXWebArea disappears from the hierarchy.
Accomplish this by adding children for attachment and scroll view elements the way other children are added.
That is, only add the non-ignored children directly (which means move the addChild logic into AccessibilityObject.)

Test: accessibility/presentation-role-iframe.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
(WebCore::AccessibilityNodeObject::insertChild): Deleted.
(WebCore::AccessibilityNodeObject::addChild): Deleted.
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::AccessibilityObject):
(WebCore::AccessibilityObject::insertChild):
(WebCore::AccessibilityObject::addChild):
(WebCore::nodeHasPresentationRole):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::addChild): Deleted.
(WebCore::AccessibilityObject::insertChild): Deleted.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::webAreaIsPresentational):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::addAttachmentChildren):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::addChildren):

LayoutTests:

* accessibility/presentation-role-iframe-expected.txt: Added.
* accessibility/presentation-role-iframe.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/presentation-role-iframe-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/presentation-role-iframe.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityNodeObject.h
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityScrollView.cpp