Closed
Bug 822983
Opened 13 years ago
Closed 13 years ago
Map SVG graphic elements to accessibility API
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: surkov, Assigned: surkov)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
8.83 KB,
patch
|
tbsaunde
:
review+
longsonr
:
review+
|
Details | Diff | Splinter Review |
http://www.w3.org/TR/SVG/intro.html#TermGraphicsElement:
graphics element
One of the element types that can cause graphics to be drawn onto the target canvas. Specifically: ‘circle’, ‘ellipse’, ‘image’, ‘line’, ‘path’, ‘polygon’, ‘polyline’, ‘rect’, ‘text’ and ‘use’.
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #693805 -
Flags: review?(trev.saunders)
Assignee | ||
Comment 2•13 years ago
|
||
Btw, probably these elements should implement IA2 IAccessibleImage interface. I can do that as follow up if it's needed. Mick, let me know if NVDA relies on it.
And svg:image element should expose @src object attribute at least to be consistent with HTML/XUL images. I can do that if that's needed as well.
Comment 3•13 years ago
|
||
Comment on attachment 693805 [details] [diff] [review]
patch
>+ } else if (content->Tag() == nsGkAtoms::rect ||
>+ content->Tag() == nsGkAtoms::circle ||
>+ content->Tag() == nsGkAtoms::ellipse ||
>+ content->Tag() == nsGkAtoms::line ||
>+ content->Tag() == nsGkAtoms::path ||
>+ content->Tag() == nsGkAtoms::polygon ||
>+ content->Tag() == nsGkAtoms::polyline ||
>+ content->Tag() == nsGkAtoms::image) {
Perhaps you should check that the frame is a nsGkAtoms::svgPathGeometryFrame instead?
Assignee | ||
Comment 4•13 years ago
|
||
(In reply to Robert Longson from comment #3)
> Comment on attachment 693805 [details] [diff] [review]
> patch
>
> >+ } else if (content->Tag() == nsGkAtoms::rect ||
> >+ content->Tag() == nsGkAtoms::circle ||
> >+ content->Tag() == nsGkAtoms::ellipse ||
> >+ content->Tag() == nsGkAtoms::line ||
> >+ content->Tag() == nsGkAtoms::path ||
> >+ content->Tag() == nsGkAtoms::polygon ||
> >+ content->Tag() == nsGkAtoms::polyline ||
> >+ content->Tag() == nsGkAtoms::image) {
>
> Perhaps you should check that the frame is a nsGkAtoms::svgPathGeometryFrame
> instead?
is it equivalent to all these checks? (including imgage?)
Comment 5•13 years ago
|
||
image frames are nsGkAtoms::svgImageFrame but their implementation is basically
class nsSVGImageFrame : public nsSVGPathGeometryFrame
So something like this should work
nsSVGPathGeometryFrame* pathGeometryFrame = do_QueryFrame(frame);
if (pathGeometryFrame) {
}
Assignee | ||
Comment 6•13 years ago
|
||
Ok, nice, I will update the patch. Thanks!
Assignee | ||
Comment 7•13 years ago
|
||
(In reply to Robert Longson from comment #5)
> image frames are nsGkAtoms::svgImageFrame but their implementation is
> basically
>
> class nsSVGImageFrame : public nsSVGPathGeometryFrame
>
> So something like this should work
>
> nsSVGPathGeometryFrame* pathGeometryFrame = do_QueryFrame(frame);
> if (pathGeometryFrame) {
> }
do_QueryFrame gives an error:
c:\mozilla\1912\obj-ff-dbg\dist\include\nsQueryFrame.h(69) : error C2385: ambiguous access of 'kFrameIID'
could be the 'kFrameIID' in base 'nsIFrame'
or could be the 'kFrameIID' in base 'nsISVGChildFrame'
c:/mozilla/1912/accessible/src/base/nsAccessibilityService.cpp(920) : see reference to function template instantiation 'do_QueryFrame::operator Dest(void)<nsSVGPathGeometryFrame>' being compiled
with
[
Dest=nsSVGPathGeometryFrame
]
cause by missed NS_DECL_QUERYFRAME_TARGET(nsSVGPathGeometryFrame) I think.
Alternatively we could use nsIFrame::AccessibleType() approach.
Assignee | ||
Comment 8•13 years ago
|
||
Attachment #693805 -
Attachment is obsolete: true
Attachment #693805 -
Flags: review?(trev.saunders)
Attachment #694231 -
Flags: review?(trev.saunders)
Attachment #694231 -
Flags: review?(longsonr)
Updated•13 years ago
|
Attachment #694231 -
Flags: review?(longsonr) → review+
Comment 9•13 years ago
|
||
Comment on attachment 694231 [details] [diff] [review]
patch2
It might be nice to use tree test to make sure kids are correct to
Attachment #694231 -
Flags: review?(trev.saunders) → review+
Assignee | ||
Comment 10•13 years ago
|
||
(In reply to Trevor Saunders (:tbsaunde) from comment #9)
> It might be nice to use tree test to make sure kids are correct to
they don't really have kids and don't expose hierarchies. that's why I pushed them as plain roles check.
Comment 11•13 years ago
|
||
(In reply to alexander :surkov from comment #2)
> Btw, probably these elements should implement IA2 IAccessibleImage
> interface. I can do that as follow up if it's needed. Mick, let me know if
> NVDA relies on it.
> And svg:image element should expose @src object attribute at least to be
> consistent with HTML/XUL images. I can do that if that's needed as well.
We do not make use of IAccessibleImage in NVDA. However, src attribute might be nice.
Assignee | ||
Comment 12•13 years ago
|
||
bug 824320 filed for scr object attribute
Assignee | ||
Comment 13•13 years ago
|
||
Flags: in-testsuite+
Comment 14•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in
before you can comment on or make changes to this bug.
Description
•