Skip to content
  • cfleizach@apple.com's avatar
    AX: Make SVG Group containers accessible elements · b2b0b4d9
    cfleizach@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=113939
    
    Reviewed by Simon Fraser.
    
    Source/WebCore: 
    
    SVG group containers are currently not exposed in the AX tree. 
    When an SVG element has a <title> child, that is not being used for the AX label.
    When hit-testing, from Accessibility, SVG groups are never returned.
    
    All these issues are fixed for Mac and iOS.
    There are two tests because right now iOS skips all the top-level accessibility tests
    due to fundamental architectural differences.
    
    Tests: accessibility/svg-group-element-with-title.html
           platform/iphone-simulator/accessibility/svg-group-element-with-title.html
    
    * accessibility/AccessibilityNodeObject.cpp:
    (WebCore::AccessibilityNodeObject::alternativeText):
    (WebCore::AccessibilityNodeObject::accessibilityDescription):
    * accessibility/AccessibilityRenderObject.cpp:
    (WebCore::AccessibilityRenderObject::accessibilityHitTest):
    (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
    * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
    (-[WebAccessibilityObjectWrapper isSVGGroupElement]):
    (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
    (-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
    * rendering/HitTestRequest.h:
        Add a new option, AccessibilityHitTest, that will allow us to override normal behavior.
    * rendering/svg/RenderSVGContainer.cpp:
    (WebCore::RenderSVGContainer::nodeAtFloatPoint):
       Allow a SVG group to be the node at a point, for accessibility hit tests.
    
    Tools: 
    
    Implement axController.elementAtPoint for iOS.
    Implement a correct version of clickPoint for iOS.
    
    * DumpRenderTree/ios/AccessibilityControllerIOS.mm:
    (AccessibilityController::elementAtPoint):
    * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
    (AccessibilityUIElement::clickPointX):
    (AccessibilityUIElement::clickPointY):
    
    LayoutTests: 
    
    * accessibility/svg-group-element-with-title-expected.txt: Added.
    * accessibility/svg-group-element-with-title.html: Added.
    * platform/iphone-simulator/accessibility/svg-group-element-with-title-expected.txt: Added.
    * platform/iphone-simulator/accessibility/svg-group-element-with-title.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b2b0b4d9