W3C home > Mailing lists > Public > public-pfwg@w3.org > February 2015

Re: make aria-owns to rearrange children

From: James Nurthen <james.nurthen@oracle.com>
Date: Tue, 17 Feb 2015 09:09:31 -0800
Message-ID: <54E375CB.2000906@oracle.com>
To: public-pfwg@w3.org
One issue with aria-owns is that as soon as you start to use it you end 
up with a massive number of idrefs.
Something I would like to be able to do is reference a parent node (with 
role=presentation) in aria-owns with the effect that its children would 
be owned.
One place we hit this a lot is in grids with multiple scrollable 
regions. So, currently, in the following 2 rows table with 2 scrollable 
regions, we have the following structure.

<tr role="row" aria-owns="r1c1 r1c2 r1c3 r1c4 r1c5 r1c6">
   <td role="gridcell" id="r1c1">
   <td role="gridcell" id="r1c2">
</tr>
<tr role="row" aria-owns="r2c1 r2c2 r2c3 r2c4 r2c5 r2c6">
   <td role="gridcell" id="r2c1">
   <td role="gridcell" id="r2c2">
</tr>
<tr role="presentation">
   <td role="gridcell" id="r1c3">
   <td role="gridcell" id="r1c4">
   <td role="gridcell" id="r1c5">
   <td role="gridcell" id="r1c6">
</tr>
<tr role="presentation">
   <td role="gridcell" id="r2c3">
   <td role="gridcell" id="r2c4">
   <td role="gridcell" id="r2c5">
   <td role="gridcell" id="r2c6">
</tr>

What I would like to be able to (which I would like to have the same 
result in the API mapping) is the following

<tr role="row" aria-owns="r1c1 r1c2 r1">
   <td role="gridcell" id="r1c1">
   <td role="gridcell" id="r1c2">
</tr>
<tr role="row" aria-owns="r2c1 r2c2 r2">
   <td role="gridcell" id="r2c1">
   <td role="gridcell" id="r2c2">
</tr>
<tr role="presentation" id="r1">
   <td role="gridcell">
   <td role="gridcell">
   <td role="gridcell">
   <td role="gridcell">
</tr>
<tr role="presentation" id="r2">
   <td role="gridcell">
   <td role="gridcell">
   <td role="gridcell">
   <td role="gridcell">
</tr>

Or, taking it one step further, allow aria-owns to reference itself, 
which would place the natural children of the element into the ownership 
at that point in the order so I could do:

<tr role="row" aria-owns="t1r1 t2r1" id="t1r1">
   <td role="gridcell">
   <td role="gridcell">
</tr>
<tr role="row" aria-owns="t1r2 t2r2" id="t1r2">
   <td role="gridcell">
   <td role="gridcell">
</tr>
<tr role="presentation" id="t2r1">
   <td role="gridcell">
   <td role="gridcell">
   <td role="gridcell">
   <td role="gridcell">
</tr>
<tr role="presentation" id="t2r2">
   <td role="gridcell">
   <td role="gridcell">
   <td role="gridcell">
   <td role="gridcell">
</tr>

If people like this idea I would be happy to come up with some spec text 
to allow it.

Regards,
James

On 2/15/2015 8:07 AM, Alexander Surkov wrote:
> Hi.
>
> aria-owns is used to define parent-child relationship [1]. The spec 
> says nothing how aria-owns affects on between-siblings relations, i.e. 
> where aria-owns children have to be in the hierarchy. So there's no 
> way for the author to control the ordering of explicit and aria-owns 
> children. The idea [2] was to let aria-owns to refer its own children 
> to change the ordering. For example,
>
> <div role="grid"
> <div role="row" aria-owns="c1 c2 c3 c4">
>   <div role="gridcell" id="c1">cell1</div>
>   <div role="gridcell" id="c2">cell1</div>
> </div>
> </div>
>
> <!-- somewhere in the DOM -->
> <div role="gridcell" id="c3">cell1</div>
> <div role="gridcell" id="c4">cell1</div>
>
> In this case role="row" would contain 4 cells in the order specified 
> by aria-owns.
>
> If the idea looks reasonable then the spec could be changed this way
>
> Insert after existing wording:
> "The value <http://www.w3.org/WAI/PF/aria/terms#def_value> of the 
> |aria-owns| attribute 
> <http://www.w3.org/WAI/PF/aria/terms#def_attribute> is a 
> space-separated list of IDREFS that reference one or more elements in 
> the document by ID."
>
> something like:
> "The order the referred elements listed in the value should be 
> preserved when their parent-child relationship is set. All explicit 
> unreferred children should be considered followed aria-owns elements."
>
> Thanks.
> Alexander.
>
> [1] http://www.w3.org/WAI/PF/aria/states_and_properties#aria-owns
> [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1133213
Received on Tuesday, 17 February 2015 17:10:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:45:23 UTC