Images within <svg> are not accessible <svg> <image alt="cake" x="20" y="20" width="300" height="80" xlink:href="resources/cake.png" />\ </svg>
*** Bug 96558 has been marked as a duplicate of this bug. ***
Created attachment 163690 [details] patch
rdar://12272554
Comment on attachment 163690 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=163690&action=review Unofficial review. 96323 (refactor AXRenderObj -> AXNodeObj) should re-land momentarily - could you update AccessibilityNodeObject::determineAccessibilityRole as well? > LayoutTests/accessibility/svg-image.html:23 > + var svg = accessibilityController.focusedElement; Maybe call this svgImage or axSvgImage to be more clear? > LayoutTests/accessibility/svg-image.html:24 > + shouldBe("svg.role", "'AXRole: AXImage'"); If you're going to check the exact string, this should go in platform/mac/accessibility. How about a cross-platform test, like this? * Add a <img> to the page also, get its role, assert that the roles of the html img and svg image are the same. * Also, debug() the actual role and description, and add test expectations for each platform.
Thanks Dominic. Will do that (In reply to comment #4) > (From update of attachment 163690 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=163690&action=review > > Unofficial review. > > 96323 (refactor AXRenderObj -> AXNodeObj) should re-land momentarily - could you update AccessibilityNodeObject::determineAccessibilityRole as well? > > > LayoutTests/accessibility/svg-image.html:23 > > + var svg = accessibilityController.focusedElement; > > Maybe call this svgImage or axSvgImage to be more clear? > > > LayoutTests/accessibility/svg-image.html:24 > > + shouldBe("svg.role", "'AXRole: AXImage'"); > > If you're going to check the exact string, this should go in platform/mac/accessibility. > > How about a cross-platform test, like this? > * Add a <img> to the page also, get its role, assert that the roles of the html img and svg image are the same. > * Also, debug() the actual role and description, and add test expectations for each platform.
(In reply to comment #5) > Thanks Dominic. Will do that > > (In reply to comment #4) > > (From update of attachment 163690 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=163690&action=review > > > > Unofficial review. > > > > 96323 (refactor AXRenderObj -> AXNodeObj) should re-land momentarily - could you update AccessibilityNodeObject::determineAccessibilityRole as well? > > Since AXNodeObject doesn't deal with other images right now, i think it would be best to save that logic for another patch > > > LayoutTests/accessibility/svg-image.html:23 > > > + var svg = accessibilityController.focusedElement; > > > > Maybe call this svgImage or axSvgImage to be more clear? > > > > > LayoutTests/accessibility/svg-image.html:24 > > > + shouldBe("svg.role", "'AXRole: AXImage'"); > > > > If you're going to check the exact string, this should go in platform/mac/accessibility. > > > > How about a cross-platform test, like this? > > * Add a <img> to the page also, get its role, assert that the roles of the html img and svg image are the same. > > * Also, debug() the actual role and description, and add test expectations for each platform.
http://trac.webkit.org/changeset/128376
(In reply to comment #7) > http://trac.webkit.org/changeset/128376 It broke the !ENABLE(SVG) builds. Could you check it, please? https://bugs.webkit.org/show_bug.cgi?id=96599
(In reply to comment #8) > (In reply to comment #7) > > http://trac.webkit.org/changeset/128376 > > It broke the !ENABLE(SVG) builds. Could you check it, please? > https://bugs.webkit.org/show_bug.cgi?id=96599 Will fix right now
(In reply to comment #9) > (In reply to comment #8) > > (In reply to comment #7) > > > http://trac.webkit.org/changeset/128376 > > > > It broke the !ENABLE(SVG) builds. Could you check it, please? > > https://bugs.webkit.org/show_bug.cgi?id=96599 > > Will fix right now Build fix http://trac.webkit.org/changeset/128405