Title: [128376] trunk
- Revision
- 128376
- Author
- cfleiz...@apple.com
- Date
- 2012-09-12 15:56:47 -0700 (Wed, 12 Sep 2012)
Log Message
AX: svg:image not accessible
https://bugs.webkit.org/show_bug.cgi?id=96341
Reviewed by Adele Peterson.
Source/WebCore:
Test: accessibility/svg-image.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
LayoutTests:
* accessibility/svg-image.html: Added.
* platform/mac/accessibility/svg-image-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (128375 => 128376)
--- trunk/LayoutTests/ChangeLog 2012-09-12 22:54:56 UTC (rev 128375)
+++ trunk/LayoutTests/ChangeLog 2012-09-12 22:56:47 UTC (rev 128376)
@@ -1,3 +1,13 @@
+2012-09-12 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: svg:image not accessible
+ https://bugs.webkit.org/show_bug.cgi?id=96341
+
+ Reviewed by Adele Peterson.
+
+ * accessibility/svg-image.html: Added.
+ * platform/mac/accessibility/svg-image-expected.txt: Added.
+
2012-09-12 Ojan Vafai <o...@chromium.org>
percentage widths rendered wrong in vertical writing mode with orthogonal parent
Added: trunk/LayoutTests/accessibility/svg-image.html (0 => 128376)
--- trunk/LayoutTests/accessibility/svg-image.html (rev 0)
+++ trunk/LayoutTests/accessibility/svg-image.html 2012-09-12 22:56:47 UTC (rev 128376)
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<img id="realimage" tabindex="0" alt="TestImage" width="100" height="100">
+
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+
+<image tabindex="0" id="svgimage" alt="TestImage" x="20" y="20" width="298" height="65" xlink:href=""
+
+</svg>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that SVG images are accessible elements and they have the same attributes as real images.");
+
+ if (window.accessibilityController) {
+ document.getElementById("realimage").focus();
+ var realImage = accessibilityController.focusedElement;
+
+ document.getElementById("svgimage").focus();
+ var svgImage = accessibilityController.focusedElement;
+ shouldBe("svgImage.role", "realImage.role");
+ shouldBe("svgImage.description", "realImage.description");
+
+ debug("SVG Image Role: " + svgImage.role);
+ debug("SVG Image Description: " + svgImage.description);
+ }
+
+</script>
+
+<script src=""
+</body>
+</html>
Added: trunk/LayoutTests/platform/mac/accessibility/svg-image-expected.txt (0 => 128376)
--- trunk/LayoutTests/platform/mac/accessibility/svg-image-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/svg-image-expected.txt 2012-09-12 22:56:47 UTC (rev 128376)
@@ -0,0 +1,14 @@
+
+This tests that SVG images are accessible elements and they have the same attributes as real images.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS svgImage.role is realImage.role
+PASS svgImage.description is realImage.description
+SVG Image Role: AXRole: AXImage
+SVG Image Description: AXDescription: TestImage
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Modified: trunk/Source/WebCore/ChangeLog (128375 => 128376)
--- trunk/Source/WebCore/ChangeLog 2012-09-12 22:54:56 UTC (rev 128375)
+++ trunk/Source/WebCore/ChangeLog 2012-09-12 22:56:47 UTC (rev 128376)
@@ -1,3 +1,15 @@
+2012-09-12 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: svg:image not accessible
+ https://bugs.webkit.org/show_bug.cgi?id=96341
+
+ Reviewed by Adele Peterson.
+
+ Test: accessibility/svg-image.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+
2012-09-12 Ojan Vafai <o...@chromium.org>
percentage widths rendered wrong in vertical writing mode with orthogonal parent
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (128375 => 128376)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2012-09-12 22:54:56 UTC (rev 128375)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2012-09-12 22:56:47 UTC (rev 128376)
@@ -2356,11 +2356,12 @@
return LegendRole;
if (m_renderer->isText())
return StaticTextRole;
- if (cssBox && cssBox->isImage()) {
+ if ((cssBox && cssBox->isImage()) || m_renderer->isSVGImage()) {
if (node && node->hasTagName(inputTag))
return ariaHasPopup() ? PopUpButtonRole : ButtonRole;
return ImageRole;
}
+
if (node && node->hasTagName(canvasTag))
return CanvasRole;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes