Bug 127292

Summary: AX: SVG <desc> element not presented by screen reader
Product: WebKit Reporter: Dirk Schulze <krit>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: cfleizach, jcraig, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 120709    
Attachments:
Description Flags
Example none

Description Dirk Schulze 2014-01-20 08:18:11 PST
Created attachment 221660 [details]
Example

<svg xmlns="http://www.w3.org/2000/svg">
	<desc>A black circle.</desc>
	<circle cx="50" cy="50" r="50"/>
</svg>

The desc element in the example above is ignored. SVGElement has a method called title() for scanning for <title> elements.

SVGDescElement has a method called description() that can be used.

Chris, James: What is the preferred way for AX to read the description?
Comment 1 Radar WebKit Bug Importer 2014-01-20 08:28:59 PST
<rdar://problem/15858877>
Comment 2 chris fleizach 2014-01-20 08:54:33 PST
(In reply to comment #0)
> Created an attachment (id=221660) [details]
> Example
> 
> <svg xmlns="http://www.w3.org/2000/svg">
>     <desc>A black circle.</desc>
>     <circle cx="50" cy="50" r="50"/>
> </svg>
> 
> The desc element in the example above is ignored. SVGElement has a method called title() for scanning for <title> elements.
> 
> SVGDescElement has a method called description() that can be used.
> 
> Chris, James: What is the preferred way for AX to read the description?

I think this would probably end up being exposed in the accessibilityDescription() method (on the mac it would be AXDescription)
Comment 3 Dirk Schulze 2014-01-20 09:19:00 PST
(In reply to comment #2)
> (In reply to comment #0)
> > Created an attachment (id=221660) [details] [details]
> > Example
> > 
> > <svg xmlns="http://www.w3.org/2000/svg">
> >     <desc>A black circle.</desc>
> >     <circle cx="50" cy="50" r="50"/>
> > </svg>
> > 
> > The desc element in the example above is ignored. SVGElement has a method called title() for scanning for <title> elements.
> > 
> > SVGDescElement has a method called description() that can be used.
> > 
> > Chris, James: What is the preferred way for AX to read the description?
> 
> I think this would probably end up being exposed in the accessibilityDescription() method (on the mac it would be AXDescription)

Hm, there is a AXDescriptionList object that I could find. Do you mean

String AccessibilityNodeObject::accessibilityDescription() const

?

This one is currently using the title element instead of the desc element. This probably should not be the case.

The title attribute is more similar to the title attribute on <a> link tag I assume. Should it be relinked?
Comment 4 chris fleizach 2014-01-20 09:20:19 PST
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #0)
> > > Created an attachment (id=221660) [details] [details] [details]
> > > Example
> > > 
> > > <svg xmlns="http://www.w3.org/2000/svg">
> > >     <desc>A black circle.</desc>
> > >     <circle cx="50" cy="50" r="50"/>
> > > </svg>
> > > 
> > > The desc element in the example above is ignored. SVGElement has a method called title() for scanning for <title> elements.
> > > 
> > > SVGDescElement has a method called description() that can be used.
> > > 
> > > Chris, James: What is the preferred way for AX to read the description?
> > 
> > I think this would probably end up being exposed in the accessibilityDescription() method (on the mac it would be AXDescription)
> 
> Hm, there is a AXDescriptionList object that I could find. Do you mean
> 
> String AccessibilityNodeObject::accessibilityDescription() const
> 
> ?
> 
> This one is currently using the title element instead of the desc element. This probably should not be the case.
> 
> The title attribute is more similar to the title attribute on <a> link tag I assume. Should it be relinked?

In that case it sounds like <title> should go to helpText() and <desc> should go to accessibilityDescription
Comment 5 Dirk Schulze 2014-01-20 10:23:55 PST
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > (In reply to comment #0)
> > > > Created an attachment (id=221660) [details] [details] [details] [details]
> > > > Example
> > > > 
> > > > <svg xmlns="http://www.w3.org/2000/svg">
> > > >     <desc>A black circle.</desc>
> > > >     <circle cx="50" cy="50" r="50"/>
> > > > </svg>
> > > > 
> > > > The desc element in the example above is ignored. SVGElement has a method called title() for scanning for <title> elements.
> > > > 
> > > > SVGDescElement has a method called description() that can be used.
> > > > 
> > > > Chris, James: What is the preferred way for AX to read the description?
> > > 
> > > I think this would probably end up being exposed in the accessibilityDescription() method (on the mac it would be AXDescription)
> > 
> > Hm, there is a AXDescriptionList object that I could find. Do you mean
> > 
> > String AccessibilityNodeObject::accessibilityDescription() const
> > 
> > ?
> > 
> > This one is currently using the title element instead of the desc element. This probably should not be the case.
> > 
> > The title attribute is more similar to the title attribute on <a> link tag I assume. Should it be relinked?
> 
> In that case it sounds like <title> should go to helpText() and <desc> should go to accessibilityDescription


Just to confirm... helpText() would still be read by the screen reader?

So:

<svg>
    <title>Title</title>
    <desc>A long description</desc>
</svg>

would result in reading both, the title and the description as it should be done for the example above?
Comment 6 chris fleizach 2014-01-20 10:45:03 PST
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > (In reply to comment #2)
> > > > (In reply to comment #0)
> > > > > Created an attachment (id=221660) [details] [details] [details] [details] [details]
> > > > > Example
> > > > > 
> > > > > <svg xmlns="http://www.w3.org/2000/svg">
> > > > >     <desc>A black circle.</desc>
> > > > >     <circle cx="50" cy="50" r="50"/>
> > > > > </svg>
> > > > > 
> > > > > The desc element in the example above is ignored. SVGElement has a method called title() for scanning for <title> elements.
> > > > > 
> > > > > SVGDescElement has a method called description() that can be used.
> > > > > 
> > > > > Chris, James: What is the preferred way for AX to read the description?
> > > > 
> > > > I think this would probably end up being exposed in the accessibilityDescription() method (on the mac it would be AXDescription)
> > > 
> > > Hm, there is a AXDescriptionList object that I could find. Do you mean
> > > 
> > > String AccessibilityNodeObject::accessibilityDescription() const
> > > 
> > > ?
> > > 
> > > This one is currently using the title element instead of the desc element. This probably should not be the case.
> > > 
> > > The title attribute is more similar to the title attribute on <a> link tag I assume. Should it be relinked?
> > 
> > In that case it sounds like <title> should go to helpText() and <desc> should go to accessibilityDescription
> 
> 
> Just to confirm... helpText() would still be read by the screen reader?
> 
> So:
> 
> <svg>
>     <title>Title</title>
>     <desc>A long description</desc>
> </svg>
> 
> would result in reading both, the title and the description as it should be done for the example above?

Yes. Generally, the user would hear "A long description" immediately and then followed by a pause and hear "Title" if we follow these guidelines we're talking about

It would be similar to

<a href="#" aria-label="LABEL" title="TITLE">

You'd hear "LABEL" pause "TITLE"
Comment 7 Dirk Schulze 2014-01-20 11:03:53 PST
> > <svg>
> >     <title>Title</title>
> >     <desc>A long description</desc>
> > </svg>
> > 
> > would result in reading both, the title and the description as it should be done for the example above?
> 
> Yes. Generally, the user would hear "A long description" immediately and then followed by a pause and hear "Title" if we follow these guidelines we're talking about
> 
> It would be similar to
> 
> <a href="#" aria-label="LABEL" title="TITLE">
> 
> You'd hear "LABEL" pause "TITLE"

Good that I asked again. I don't think that the order is correct: http://www.w3.org/TR/2000/NOTE-SVG-access-20000807/#Structured

Should be first title then description. title is like a header or naming. Is there anything else that matches the description?

http://blog.paciellogroup.com/2013/12/using-aria-enhance-svg-accessibility/

Suggests

title = accessible name
desc = accessible description
Comment 8 James Craig 2014-04-01 23:50:40 PDT
Isn't this a dupe of bug 54357?

*** This bug has been marked as a duplicate of bug 54357 ***