This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20851 - Allowed ARIA roles for UL, OL should include group to allow for treeview scenario?
Summary: Allowed ARIA roles for UL, OL should include group to allow for treeview scen...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Using ARIA in HTML (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Hans Hillen
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords: a11y, a11ytf, aria
Depends on:
Blocks:
 
Reported: 2013-02-02 00:05 UTC by Brendan McKeon
Modified: 2014-06-08 14:37 UTC (History)
6 users (show)

See Also:


Attachments

Description Brendan McKeon 2013-02-02 00:05:45 UTC
Per ARIA Roles model spec (http://www.w3.org/TR/wai-aria/roles#treeitem), the structure of a tree is described as a parent/container with role of tree, items with role of treeitem, and groups of collapsable/expandable treeitems can be enclosed in elements with role group.

This would seem to suggest construction in DOM as nested UL>LI>UL>LI..., with corresponding roles tree>treeitem>group>treeitem..., but the list of allowed roles for UL disallows group, so currenly disallows this.

The list of allowed ARIA roles for UL/OL/LI are specified in:
* http://dvcs.w3.org/hg/aria-unofficial/raw-file/tip/index.html
* http://www.w3.org/html/wg/drafts/html/master/dom.html#sec-implicit-aria-semantics

An LI can be a treeitem; a treeitem can have a tree or group as its parent; the parent of a LI can be either a UL or OL; this would suggest that UL or OL should in turn be tree or group, but the above specs disallow UL or OL from having role of group, and only allow: directory, list, listbox, menu, menubar, tablist, toolbar, tree.

The NU validator flags <ul role="group"> as being in error, likely as a result of this.

This issue arose as a result of a StackOverflow qu about the validator behavior - http://stackoverflow.com/questions/14616615/html5-validation-on-aria-trees/14622336



(If it is actually the case that the spec is correct here, and that UL/OL should not have a role of group, then this raises the question of what elements should be used to represent the items in a nested portion of a tree; could no longer use LIs, since it must have UL or OL as a parent.)
Comment 1 Hans Hillen 2013-10-21 02:44:12 UTC
I've added "group" as allowed role for UL elements. The HTML5 spec currently still does not list group as an allowed role for OL, so it should probably be added there first before changing it here.
Comment 2 steve faulkner 2014-06-08 14:37:06 UTC
(In reply to Hans Hillen from comment #1)
> I've added "group" as allowed role for UL elements. The HTML5 spec currently
> still does not list group as an allowed role for OL, so it should probably
> be added there first before changing it here.

group role now allowed on ol in html5