AX: Implement missing/different accessibility API mappings for SVG
https://bugs.webkit.org/show_bug.cgi?id=155034
Reviewed by Chris Fleizach.
Source/WebCore:
Create an AccessibilitySVGElement class for the SVG-specific mappings;
fix name and description mappings for ATK; add new AccessibilityRole
types (SVGTextRole, SVGTSpanRole, SVGTextPathRole) and map them for
ATK and AX API.
Tests: accessibility/w3c-svg-description-calculation.html
accessibility/w3c-svg-elements-not-exposed.html
accessibility/w3c-svg-name-calculation.html
accessibility/w3c-svg-presentational-role.html
accessibility/w3c-svg-roles.html
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityAllInOne.cpp:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText): Deleted.
(WebCore::AccessibilityNodeObject::accessibilityDescription): Deleted.
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isAccessibilitySVGElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): Deleted.
* accessibility/AccessibilitySVGElement.cpp: Added.
(WebCore::AccessibilitySVGElement::AccessibilitySVGElement):
(WebCore::AccessibilitySVGElement::~AccessibilitySVGElement):
(WebCore::AccessibilitySVGElement::create):
(WebCore::AccessibilitySVGElement::targetForUseElement):
(WebCore::AccessibilitySVGElement::accessibilityText):
(WebCore::AccessibilitySVGElement::accessibilityDescription):
(WebCore::AccessibilitySVGElement::helpText):
(WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored):
(WebCore::AccessibilitySVGElement::inheritsPresentationalRole):
(WebCore::AccessibilitySVGElement::determineAriaRoleAttribute):
(WebCore::AccessibilitySVGElement::determineAccessibilityRole):
* accessibility/AccessibilitySVGElement.h: Added.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetName):
(webkitAccessibleGetDescription):
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
* rendering/RenderObject.h:
(WebCore::RenderObject::isSVGTSpan):
* rendering/svg/RenderSVGTSpan.h:
LayoutTests:
* accessibility/svg-group-element-with-title.html: Modified to reflect correct ATK results.
* accessibility/svg-image.html: Modified to reflect correct ATK results.
* accessibility/svg-labelledby.html: Modified to reflect correct ATK results.
* accessibility/svg-remote-element.html: Modified to reflect correct ATK results.
* accessibility/w3c-svg-description-calculation.html: Added.
* accessibility/w3c-svg-elements-not-exposed.html: Added.
* accessibility/w3c-svg-name-calculation.html: Added.
* accessibility/w3c-svg-presentational-role.html: Added.
* accessibility/w3c-svg-roles.html: Added.
* platform/gtk/accessibility/svg-group-element-with-title-expected.txt: Added.
* platform/gtk/accessibility/svg-image-expected.txt: Added.
* platform/gtk/accessibility/svg-labelledby-expected.txt: Added.
* platform/gtk/accessibility/svg-remote-element-expected.txt: Added.
* platform/gtk/accessibility/w3c-svg-description-calculation-expected.txt: Added.
* platform/gtk/accessibility/w3c-svg-elements-not-exposed-expected.txt: Added.
* platform/gtk/accessibility/w3c-svg-name-calculation-expected.txt: Added.
* platform/gtk/accessibility/w3c-svg-presentational-role-expected.txt: Added.
* platform/gtk/accessibility/w3c-svg-roles-expected.txt: Added.
* platform/mac/accessibility/w3c-svg-description-calculation-expected.txt: Added.
* platform/mac/accessibility/w3c-svg-elements-not-exposed-expected.txt: Added.
* platform/mac/accessibility/w3c-svg-name-calculation-expected.txt: Added.
* platform/mac/accessibility/w3c-svg-presentational-role-expected.txt: Added.
* platform/mac/accessibility/w3c-svg-roles-expected.txt: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@197616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
39 files changed