Bug 20887

Summary: Legend tag should be exposed through AX
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Expose <legend> tag in AX
darin: review-
<legend> patch, updated based on review darin: review+

Description chris fleizach 2008-09-16 11:04:44 PDT
the object in AX representing the field set should have its title ui element set to the legend tag (if there is a legend tag)
Comment 1 chris fleizach 2008-09-18 17:48:50 PDT
Created attachment 23548 [details]
Expose <legend> tag in AX
Comment 2 Darin Adler 2008-09-18 23:30:25 PDT
Comment on attachment 23548 [details]
Expose <legend> tag in AX

 427     Node *element = m_renderer->element();

Should be Node*, not "Node *".

 1061     if (isFieldset())
 1062         return axObjectCache()->get(static_cast<RenderFieldset*>(m_renderer)->findLegend());

This assumes that the renderer will be a RenderFieldset because the tag is fieldsetTag. Why is that a safe assumption? Instead, both function should be looking at hte renderer, and neither should be asking what the tag name is.

Patch otherwise looks fine. review- because of the DOM/Renderer assumption.
Comment 3 chris fleizach 2008-09-19 09:08:13 PDT
Created attachment 23566 [details]
<legend> patch, updated based on review
Comment 4 Darin Adler 2008-09-19 12:13:15 PDT
Comment on attachment 23566 [details]
<legend> patch, updated based on review

     virtual bool isWidget() const { return false; }
-
+    virtual bool isFieldset() const { return false; }

The rest of these are in alphabetical order. It would be better if you sorted your new one in rather than putting it at the bottom.

r=me
Comment 5 chris fleizach 2008-09-19 13:25:46 PDT
http://trac.webkit.org/changeset/36670