Last Comment Bug 764118 - svg element role is diagram
: svg element role is diagram
Status: NEW
:
Product: Firefox
Classification: Client Software
Component: Disability Access (show other bugs)
: 14 Branch
: x86 Windows Vista
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks: svga11y
  Show dependency treegraph
 
Reported: 2012-06-12 13:05 PDT by steve faulkner
Modified: 2013-11-15 02:10 PST (History)
5 users (show)
jamie: needinfo? (mick)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description steve faulkner 2012-06-12 13:05:10 PDT
checked <svg> element role value with an API inspect tool, found it is mapped to 'diagram' role = "Represents a graphical image used to diagram data. " does not seem to be right role for <svg>. SVG elements can contain any graphical informations not just diagrams. Suggest changing to role=graphic https://developer.mozilla.org/en/Accessibility/AT-APIs/Gecko/Roles/ROLE_GRAPHIC (also mapped as graphic by IE)
Comment 1 alexander :surkov 2012-09-04 21:16:54 PDT
Sound reasonable but there's a problem. The graphic role doesn't have children historically, svg can contain text that might be interesting for ATs.
Comment 2 steve faulkner 2012-09-05 01:23:29 PDT
(In reply to alexander :surkov from comment #1)
> Sound reasonable but there's a problem. The graphic role doesn't have
> children historically, svg can contain text that might be interesting for
> ATs.

Ok will think about it some more :-)
Comment 3 steve faulkner 2013-11-07 04:40:26 PST
surkov, did some testing may be of interest: https://dl.dropboxusercontent.com/u/377471/SVG/adobesimplesvgtest1.html
Comment 4 alexander :surkov 2013-11-07 06:43:36 PST
(In reply to alexander :surkov from comment #1)
> Sound reasonable but there's a problem. The graphic role doesn't have
> children historically, svg can contain text that might be interesting for
> ATs.

actually image map has children and exposed as graphic role on MSAA layer. I think we can switch to graphic role for svg.
Comment 5 alexander :surkov 2013-11-07 06:48:01 PST
Jamie, do you have objections on the change?
Comment 6 steve faulkner 2013-11-07 08:36:20 PST
(In reply to alexander :surkov from comment #4)
> (In reply to alexander :surkov from comment #1)
> > Sound reasonable but there's a problem. The graphic role doesn't have
> > children historically, svg can contain text that might be interesting for
> > ATs.
> 
> actually image map has children and exposed as graphic role on MSAA layer. I
> think we can switch to graphic role for svg.

the change will mean that svg is recognised by AT at least without having to add ARIA
Comment 7 alexander :surkov 2013-11-07 08:43:58 PST
(In reply to steve faulkner from comment #6)

> the change will mean that svg is recognised by AT at least without having to
> add ARIA

oh, so DIAGRAM is rather a hindrance, ok good.

(In reply to steve faulkner from comment #3)
> surkov, did some testing may be of interest:
> https://dl.dropboxusercontent.com/u/377471/SVG/adobesimplesvgtest1.html

btw, thank you for doing this
Comment 8 James Teh [:Jamie] 2013-11-07 16:20:59 PST
I don't have any huge objections; it should work for NVDA. However:
1. I don't quite follow the argument that "SVG elements can contain any graphical informations not just diagrams". I guess I thought of a diagram just as a compound graphical representation.
2. I know image maps have children, but this has always struck me as odd anyway. I've always thought a graphic shouldn't have children. I guess I think of a graphic as a single piece of image data that can't be broken down any further for accessibility purposes, so having graphics as children of a diagram makes sense to me.

Requesting feedback from Mick, since he's worked with SVG significantly more than I have.
Comment 9 James Teh [:Jamie] 2013-11-07 16:22:31 PST
Btw, the fact that NVDA (and other screen readers) doesn't handle the diagram role in browse mode should probably be considered a bug. Imo, that isn't sufficient reason to implement this if there are reasonable objections.
Comment 10 Trevor Saunders (:tbsaunde) 2013-11-12 22:55:47 PST
(In reply to James Teh [:Jamie] from comment #8)
> I don't have any huge objections; it should work for NVDA. However:
> 1. I don't quite follow the argument that "SVG elements can contain any
> graphical informations not just diagrams". I guess I thought of a diagram
> just as a compound graphical representation.
> 2. I know image maps have children, but this has always struck me as odd
> anyway. I've always thought a graphic shouldn't have children. I guess I
> think of a graphic as a single piece of image data that can't be broken down
> any further for accessibility purposes, so having graphics as children of a
> diagram makes sense to me.

fwiw I think I agree with this.
Comment 11 alexander :surkov 2013-11-13 06:21:32 PST
(In reply to James Teh [:Jamie] from comment #8)
> I don't have any huge objections; it should work for NVDA. However:
> 1. I don't quite follow the argument that "SVG elements can contain any
> graphical informations not just diagrams". I guess I thought of a diagram
> just as a compound graphical representation.

for me a diagram means something technical like graphics. If svg was used to draw an image from child cartoon movie then would be ok to call it a diagram?
Comment 12 steve faulkner 2013-11-13 06:30:12 PST
from recent testing of SVG I really think the way SVG and its sub tree is represented in the accessibility tree needs to be reviewed. complex SVG can have hundreds of graphic elements, many of which may or may not be best represented as graphics (text for example) also it may be more useful to have their role represented as the shape they convey. for example role=circle, it very much depends on the context.
Comment 13 alexander :surkov 2013-11-13 06:34:53 PST
(In reply to steve faulkner from comment #12)
> from recent testing of SVG I really think the way SVG and its sub tree is
> represented in the accessibility tree needs to be reviewed. complex SVG can
> have hundreds of graphic elements, many of which may or may not be best
> represented as graphics (text for example) also it may be more useful to
> have their role represented as the shape they convey. for example
> role=circle, it very much depends on the context.

afaik Firefox exposes stuff that have a meaning like elements having title or desc. Exposing shaping should be nice. Role is probably not a best mechanism for this though. Anyway, is it related to root svg element role?
Comment 14 James Teh [:Jamie] 2013-11-14 15:29:41 PST
(In reply to alexander :surkov from comment #11)
> for me a diagram means something technical like graphics.
I realise you probably just used the wrong term there, but I can't help but point out that "graphic" also refers to "graphics". :)

> If svg was used to
> draw an image from child cartoon movie then would be ok to call it a diagram?
It's certainly a stretch. Wiktionary would seem to agree with you:
> 1. A plan, drawing, sketch or outline to show how something works, or show the relationships between the parts of a whole.
> 2. A graph or chart.

I still feel there really should be a distinction between compound and leaf graphics like there is between documents and paragraphs, but perhaps you're right that diagram isn't the right term.
Comment 15 alexander :surkov 2013-11-14 20:23:16 PST
(In reply to James Teh [:Jamie] from comment #14)
> (In reply to alexander :surkov from comment #11)
> > for me a diagram means something technical like graphics.
> I realise you probably just used the wrong term there, but I can't help but
> point out that "graphic" also refers to "graphics". :)
> 
> > If svg was used to
> > draw an image from child cartoon movie then would be ok to call it a diagram?
> It's certainly a stretch. Wiktionary would seem to agree with you:
> > 1. A plan, drawing, sketch or outline to show how something works, or show the relationships between the parts of a whole.
> > 2. A graph or chart.

you know I still translate :) hoping that english to russian and back still makes sense :) good know it works sometimes :)

> I still feel there really should be a distinction between compound and leaf
> graphics like there is between documents and paragraphs, but perhaps you're
> right that diagram isn't the right term.

a primary point I think is the spec should point what role is in use. If it's diagram then we should convince IE (or at least to state clearly why) it's preferable over graphic role.

(but I share the point that graphic as a container doesn't look a right match)
Comment 16 steve faulkner 2013-11-15 01:47:18 PST
(In reply to alexander :surkov from comment #13)
> (In reply to steve faulkner from comment #12)
> > from recent testing of SVG I really think the way SVG and its sub tree is
> > represented in the accessibility tree needs to be reviewed. complex SVG can
> > have hundreds of graphic elements, many of which may or may not be best
> > represented as graphics (text for example) also it may be more useful to
> > have their role represented as the shape they convey. for example
> > role=circle, it very much depends on the context.
> 
> afaik Firefox exposes stuff that have a meaning like elements having title
> or desc. Exposing shaping should be nice. Role is probably not a best
> mechanism for this though. Anyway, is it related to root svg element role?

no me just going off into weeds
Comment 17 steve faulkner 2013-11-15 01:52:11 PST
(In reply to alexander :surkov from comment #15)
> (In reply to James Teh [:Jamie] from comment #14)
> > (In reply to alexander :surkov from comment #11)
> > > for me a diagram means something technical like graphics.
> > I realise you probably just used the wrong term there, but I can't help but
> > point out that "graphic" also refers to "graphics". :)
> > 
> > > If svg was used to
> > > draw an image from child cartoon movie then would be ok to call it a diagram?
> > It's certainly a stretch. Wiktionary would seem to agree with you:
> > > 1. A plan, drawing, sketch or outline to show how something works, or show the relationships between the parts of a whole.
> > > 2. A graph or chart.
> 
> you know I still translate :) hoping that english to russian and back still
> makes sense :) good know it works sometimes :)
> 
> > I still feel there really should be a distinction between compound and leaf
> > graphics like there is between documents and paragraphs, but perhaps you're
> > right that diagram isn't the right term.
> 
> a primary point I think is the spec should point what role is in use. If
> it's diagram then we should convince IE (or at least to state clearly why)
> it's preferable over graphic role.

on windows 'diagram' is only used by firefox, IE uses graphic, Chrome does not expose. On Mac chrome/safari use 'image'. The only current reliable way to get browser across OS to recognise SVG is to use ARIA role=img
Comment 18 steve faulkner 2013-11-15 02:10:25 PST
(In reply to steve faulkner from comment #17)
> (In reply to alexander :surkov from comment #15)
> > (In reply to James Teh [:Jamie] from comment #14)
> > > (In reply to alexander :surkov from comment #11)
> > > > for me a diagram means something technical like graphics.
> > > I realise you probably just used the wrong term there, but I can't help but
> > > point out that "graphic" also refers to "graphics". :)
> > > 
> > > > If svg was used to
> > > > draw an image from child cartoon movie then would be ok to call it a diagram?
> > > It's certainly a stretch. Wiktionary would seem to agree with you:
> > > > 1. A plan, drawing, sketch or outline to show how something works, or show the relationships between the parts of a whole.
> > > > 2. A graph or chart.
> > 
> > you know I still translate :) hoping that english to russian and back still
> > makes sense :) good know it works sometimes :)
> > 
> > > I still feel there really should be a distinction between compound and leaf
> > > graphics like there is between documents and paragraphs, but perhaps you're
> > > right that diagram isn't the right term.
> > 
> > a primary point I think is the spec should point what role is in use. If
> > it's diagram then we should convince IE (or at least to state clearly why)
> > it's preferable over graphic role.
> 
> on windows 'diagram' is only used by firefox, IE uses graphic, Chrome does
> not expose. On Mac chrome/safari use 'image'. The only current reliable way
> to get browser across OS to recognise SVG is to use ARIA role=img

sorry that is incorrect the mappings are as in the results : https://dl.dropboxusercontent.com/u/377471/SVG/adobesimplesvgtest1.html

Note You need to log in before you can comment on or make changes to this bug.