Re: How aria-multiselectable applies to TreeViews

Thanks for the example Hans.  That is how I imagined it working based on the current spec.  However, I think that the first example is a good use case for "aria-selected" to support a "mixed" value.  Don't you think?  Otherwise, I don't see the value in having "aria-multiselectable" supported on the "tree" role if you cannot indicate partially selected branches.

I understand your point about using "aria-checked" over "aria-selected" for trees that need to support multiple selection.  That seems to be everyone's answer.  So, if that is the case, what's the reason bind the "tree" role supporting "aria-multiselectable"?

Just trying to get my head around the uses cases that led to "tree" role supporting "aria-multiselectable".

Any insight would be appreciated.

Thanks,
Todd

On Dec 8, 2010, at 5:30 AM, Hans Hillen wrote:

> Hi todd,
> 
> I have a very basic example tree that uses aria-multiselectable="true" here: http://www.paciellogroup.com/blog/misc/samples/aria/tree/ . (The first treeview is multiselectable).
> 
> It doesn't indicate partially selected branches though. I think the best approach for indicating these would be to simply use aria-checked rather than aria-selected, and set aria-checked="mixed" on branch nodes where applicable. I'm not really sure if this fit's in the spec though, for example whether that would make sense in combination with  aria-multiselectable="true" (since you wouldn't really be using selection anymore). Also, I vaguely remember the ARIA specs once mentioning that the "mixed" value was only allowed on checkboxes (and therefore not on treeitem roles), but I can't find that anywhere in the latest version so maybe it's OK now.
> 
> Using aria-checked="mixed"  might be the easiest solution since it doesn't require a change to the spec, and many multiselectable treeviews would already use checboxes to indicate their selected state anyway. Of course if anybody can tell me why this is a bad idea, I'm all ears.
> 
> Regards,
> 
> Hans Hillen
> 
> 
> 
> On Dec 3, 2010, at 1:03 AM, Todd Kloots wrote:
> 
>> James - 
>> 
>> I think you misread my email.  I was asking for guidance rather than arguing a position.  I am confused how "aria-multiselectable" is designed to work with the "tree" role - not the "menu" role.  Specifically, how do we indicate the selected state of a parent node in a tree control if only some of the node's children are selected?  For example, consider the following markup:
>> 
>> <ul role="tree" aria-multiselectable="true">
>> <li role="presentation">
>>   <a role="treeitem" aria-expanded="true" href="#group-1">Fruits</a> <!-- parent node -->
>>   <ul id="group-1" role="group">
>>     <li role="treeitem" aria-selected="true">Apple</li>
>>     <li role="treeitem" aria-selected="false">Orange</li>
>>     <li role="treeitem" aria-selected="true">Pear</li>      
>>   </ul>
>> </li>
>> </ul>
>> 
>> In this instance would the parent "Fruits" treeitem have an "aria-selected" state value of "true" or "false"?  Or does this use case illustrate the need for a value of "mixed"?
>> 
>> - Todd
>> 
>> On Dec 2, 2010, at 3:16 PM, James Craig wrote:
>> 
>>> I'm not opposed to opening an ARIA 2.0 issue for adding a "mixed" state for aria-selected, but you'll be able to sell the idea better if you come up with a real-world scenario where this might be useful. Many cases would/could be covered by nested menus with groups of menuitemradio elements. 
>>> 
>>> On Nov 26, 2010, at 4:18 PM, Todd Kloots wrote:
>>> 
>>>> I am curious how it is imagined that the "aria-multiselectable" and "aria-selected" properties apply to a TreeView control?  The ARIA spec indicates that the "aria-multiselectable" property can be used with the the "tree" role, and the "aria-selected" state with "treeitem".  However, the "aria-selected" state only accepts a boolean.  How should developers indicate parent nodes in a partially selected stated - some tree items selected, some not.  And how is a screen reader supposed to announce the partially selected state of a parent node?
>>>> 
>>>> I've yet to find any ARIA TreeView examples that make use of "aria-multiselectable", but considering the spec indicates that it applies to trees and the ARIA Authoring Practices specifies keyboard shortcuts for supporting multiple selection on trees, I figured some thought must have been given to this use case.
>>>> 
>>>> Any insight would be greatly appreciated.
>>>> 
>>>> Thanks,
>>>> Todd
>>> 
>> 
>> 
> 

Received on Thursday, 9 December 2010 20:45:04 UTC