Closed Bug 459357 Opened 16 years ago Closed 11 years ago

Support accessible name computation for SVG

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: aaronlev, Assigned: surkov)

References

(Blocks 2 open bugs)

Details

(Keywords: access)

Attachments

(1 file)

I believe we will need to support the title attribute for SVG. Not sure if there are any other attributes that could influence the name (other than ARIA ones).
title attribute? SVG has a title element which is bug 329212.
Robert, thanks. Anything else where a text equivalent might be specified?
http://www.w3.org/TR/SVG-access/#Links mentions the xlink:title attribute on links and title and desc elements
from bug 633983:

A request from the wild, and should be easy enough. The idea is to map a child element <title> to the accessible name, and the <desc> to accessible description.

btw, there's a test case there.
Attached patch patchSplinter Review
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #693786 - Flags: review?(trev.saunders)
Comment on attachment 693786 [details] [diff] [review]
patch

>+function testDescr(aAccOrElmOrID, aDescr)
>+{
>+  var acc = getAccessible(aAccOrElmOrID);
>+  if (!acc)
>+   return;

I'd rather we didn't just return if the element doesn't have an accessible.

>+    {
>+      testName("svg1", "A name");
>+      testDescr("svg1", "A description");
>+      testName("svg2", "A tooltip");

test svg2 has no description?  maybe not because its important, but would be nice to know if we change it unintentionally
Attachment #693786 - Flags: review?(trev.saunders) → review+
(In reply to Trevor Saunders (:tbsaunde) from comment #7)
> Comment on attachment 693786 [details] [diff] [review]
> patch
> 
> >+function testDescr(aAccOrElmOrID, aDescr)
> >+{
> >+  var acc = getAccessible(aAccOrElmOrID);
> >+  if (!acc)
> >+   return;
> 
> I'd rather we didn't just return if the element doesn't have an accessible.

getAccessible() reports an error if the given ID is not accessible so returning seems to be a right thing.

> >+      testName("svg1", "A name");
> >+      testDescr("svg1", "A description");
> >+      testName("svg2", "A tooltip");
> 
> test svg2 has no description?  maybe not because its important, but would be
> nice to know if we change it unintentionally

ok, good point
Btw, I think it'd be nice to keep name and description in the same place (not separately) since they are closely related. But keeping description stuff under name might be not nice. Alternatives: "textequivalent", "textequiv" or "namedescr". Which one do you think suites better?
https://hg.mozilla.org/mozilla-central/rev/18e5579588b5
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Depends on: 868789
You need to log in before you can comment on or make changes to this bug.