W3C home > Mailing lists > Public > wai-xtech@w3.org > December 2009

Re: ARIA setsize attribute

From: Hans Hillen <hhillen@paciellogroup.com>
Date: Sat, 12 Dec 2009 16:11:54 +1300
Cc: wai-xtech@w3.org, David Bolter <dbolter@mozilla.com>, Richard Schwerdtfeger <schwer@us.ibm.com>
Message-Id: <038DEE3C-D26D-44A9-A6CA-1AB25BD4EAD6@paciellogroup.com>
To: Alexander Surkov <surkov.alexander@gmail.com>
Hi Alex

> I thought it works. We must have a bug. If you don't mind then please file it.
Ok, will file a bug. It would be great if this works because it's currently quite a hassle for me to calculate the setsize value, whereas the level is already known.

> 
> I think it shouldn't be a table element because I meant logical parent like
> 
> <table role="treegrid">
>  <tr role="row" aria-level="1" aria-setsize="4">
>    <td role="gridcell" aria-posinset="1">item1</td>
>  </tr>
>  <tr role="row" aria-level="2">
>    <td role="gridcell">item1.1</td>
>  </tr>
>  <tr role="row" aria-level="1">
>    <td role="gridcell">item2</td>
>  </tr>
> </table>
> 
This should explain my use case better: 

<table role="tree">
	<tr role="presentation"><td role="treeitem" aria-expanded="true" aria-level="1" aria-posinset="1" aria-setsize="3">vegetables</td></tr>
	<tr role="presentation"><td role="treeitem" aria-level="2" aria-posinset="1" aria-setsize="2">cucumber</td></tr>
	<tr role="presentation"><td role="treeitem" aria-level="2" aria-posinset="2" aria-setsize="2">carrot</td></tr>
	<tr role="presentation"><td role="treeitem" aria-expanded="false" aria-level="1" aria-posinset="2" aria-setsize="3">cars</td></tr>
	<tr role="presentation"><td role="treeitem" aria-level="2" aria-posinset="1" aria-setsize="3">mercedes</td></tr>
	<tr role="presentation"><td role="treeitem" aria-level="2" aria-posinset="2" aria-setsize="3">BMW</td></tr>
	<tr role="presentation"><td role="treeitem" aria-level="2" aria-posinset="1" aria-setsize="3">Audi</td></tr>
	<tr role="presentation"><td role="treeitem" aria-level="1" aria-posinset="3" aria-setsize="3">people</td></tr>
</table>

Hans 
> 
> On Sat, Dec 12, 2009 at 10:47 AM, Hans Hillen <hhillen@paciellogroup.com> wrote:
>> Hi Alex,
>> 
>>> 
>>> I think it is intended to fix DOM structure if some amount of items
>>> are not yet loaded.
>> OK
>>> 
>>> In your tree example the author shouldn't be forced to use
>>> aria-setsize and aria-posinset because they can be calculated easy
>>> from aria-level attribute.
>> I see, I don't think this is this something Firefox does at the moment? I've just removed the aria-posinset and aria-setsize from my code in the Firebug UI (which is what that example was based on), and it stopped correctly exposing the tree structure.
>> 
>>> Any way aria-setsize could be defined on
>>> the treeitem parent in this case.
>> 
>> But in this example the treeitem's parent would be the table element itself, which represents the entire tree rather than a particular tree branch.
>> 
>> Regards,
>> Hans
>> 
>>> Alex.
>>> 
>>> 
>>> On Sat, Dec 12, 2009 at 10:13 AM, Hans Hillen <hhillen@paciellogroup.com> wrote:
>>>> From what I understand, aria-setsize is intended to fix dom structures where
>>>> the set size can't be determined automatically from the DOM, e.g. a tree
>>>> widget that is marked up as a flat html table and every row has a role of
>>>> treeitem. In this case case the treeitems are not grouped by branch in the
>>>> DOM structure, so you would need to apply aria-setsize aria-posinset to and
>>>> aria-level  to every treeitem to fix this lack of structure.
>>>> Wouldn't setting aria-setsize on a container be a bit pointless, because:
>>>> 
>>>> If the container truly represents the set, then you wouldn't need the
>>>> aria-setsize attribute anymore because the setsize can be determined from
>>>> the DOM structure. If it can't be (for example because certain child roles
>>>> are not DOM children of the container) then aria-owns should be used and the
>>>> user agent should add it to the automatically calculated set size.
>>>> If the container does not reflect the actual set (as in my tree example
>>>> above), then aria-setsize wouldn't be applicable on this node.
>>>> 
>>>> Unless I'm missing something?
>>>> Regards,
>>>> 
>>>> Hans Hillen
>>>> TPG Europe
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Dec 12, 2009, at 2:29 PM, Alexander Surkov wrote:
>>>> 
>>>> Hi.
>>>> 
>>>> The ARIA specification says "This property is marked on the members of
>>>> a set, not the container element that collects the members of the set.
>>>> " (see http://www.w3.org/WAI/PF/aria/states_and_properties#aria-setsize).
>>>> However the same time it provides an example where the aria-setsize is
>>>> used on the container element:
>>>> 
>>>> <ul role="listbox" aria-setsize="16" aria-labelledby="label_fruit">
>>>>  <li role="option" aria-posinset="1"> apples </li>
>>>> 
>>>> I find the idea to define aria-setsize on the container element
>>>> reasonable and useful and I would happy if the user agents would take
>>>> into account the aria-setsize on the container only. But I'm fine with
>>>> either way because currently aria-setsize is supposed to be used on
>>>> the item.
>>>> 
>>>> Can the spec be fixed?
>>>> 
>>>> Thank you.
>>>> Alex.
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
> 
Received on Saturday, 12 December 2009 03:12:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:25:28 UTC