Bug 25414 - [GTK] ROLE_PANEL should not be used for paragraphs and list items.
Summary: [GTK] ROLE_PANEL should not be used for paragraphs and list items.
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on: 21546
Blocks: 25531
  Show dependency treegraph
 
Reported: 2009-04-26 16:49 PDT by Joanmarie Diggs (irc: joanie)
Modified: 2009-05-20 12:42 PDT (History)
3 users (show)

See Also:


Attachments
aforementioned test case (432 bytes, text/html)
2009-04-26 16:51 PDT, Joanmarie Diggs (irc: joanie)
no flags Details
paragraphrole.patch (2.25 KB, patch)
2009-05-20 05:59 PDT, Xan Lopez
jmalonzo: review+
Details | Formatted Diff | Diff
listitemrole.patch (2.38 KB, patch)
2009-05-20 06:00 PDT, Xan Lopez
jmalonzo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs (irc: joanie) 2009-04-26 16:49:49 PDT
Steps to reproduce:

1. View the (to be) attached document in WebKit Gtk.

2. Examine any of the paragraphs (i.e. items formatted with <p></p>) and list items (i.e. items formatted with <li></li>) using Accerciser.

Expected results: Paragraphs would be exposed as being of ROLE_PARAGRAPH; list items as ROLE_LIST_ITEM.

Actual results: Paragraphs and list items are exposed as ROLE_PANEL.
Comment 1 Joanmarie Diggs (irc: joanie) 2009-04-26 16:51:08 PDT
Created attachment 29807 [details]
aforementioned test case
Comment 2 Xan Lopez 2009-05-20 05:59:37 PDT
Created attachment 30505 [details]
paragraphrole.patch

Implement ATK_ROLE_PARAGRAPH.
Comment 3 Xan Lopez 2009-05-20 06:00:00 PDT
Created attachment 30506 [details]
listitemrole.patch

Implement ATK_ROLE_LIST_ITEM.
Comment 4 Jan Alonzo 2009-05-20 06:33:28 PDT
Comment on attachment 30506 [details]
listitemrole.patch

 
> +    // WebCore does not seem to have a role for list items
> +    if (AXObject->roleValue() == GroupRole) {

Why? List is not a child role of group so I don't think it's required (http://www.w3.org/TR/wai-aria/#group)

> +        AccessibilityObject* parent = AXObject->parentObjectUnignored();
> +        if (parent && parent->roleValue() == ListRole)

You can just isList() here instead.
Comment 5 Jan Alonzo 2009-05-20 06:59:58 PDT
Comment on attachment 30506 [details]
listitemrole.patch

> +    // WebCore does not seem to have a role for list items
> +    if (AXObject->roleValue() == GroupRole) {

isGroup()

> +        AccessibilityObject* parent = AXObject->parentObjectUnignored();
> +        if (parent && parent->roleValue() == ListRole)

isList()

With those changes, r=me.
Comment 6 Jan Alonzo 2009-05-20 07:13:06 PDT
Comment on attachment 30505 [details]
paragraphrole.patch

Please check if we have a node() first just in case we may not have one. 

r=me.
Comment 7 Xan Lopez 2009-05-20 07:33:50 PDT
(In reply to comment #5)
> (From update of attachment 30506 [details] [review])
> > +    // WebCore does not seem to have a role for list items
> > +    if (AXObject->roleValue() == GroupRole) {
> 
> isGroup()
> 
> > +        AccessibilityObject* parent = AXObject->parentObjectUnignored();
> > +        if (parent && parent->roleValue() == ListRole)
> 
> isList()
> 
> With those changes, r=me.
> 

Thanks, landed as r43907.
Comment 8 Xan Lopez 2009-05-20 07:34:14 PDT
(In reply to comment #6)
> (From update of attachment 30505 [details] [review])
> Please check if we have a node() first just in case we may not have one. 
> 
> r=me.
> 

Done so and landed as r43908.
Comment 9 Joanmarie Diggs (irc: joanie) 2009-05-20 12:42:27 PDT
Thanks Xan. Marking as VERIFIED.