Re: [aapi] Computing aria-level when it is not specified

Hi, Cynthia. I'd say level computation is rather straight forward since
it's just a level of its parent item + 1 (parent item may be logical parent
for sure). So I would put your question into form of "what widget
structures are valid". ARIA provides info about what role can contain what
role, but imo it should also provide detailed descriptions of valid widget
structures.

Example 1. I'd say widget structure invalid. 2nd list item should be
contained by either list or group which is directly contained by list item.
Example 2. I believe Firefox doesn't repair level for aria headings. Not
sure if the browser should do something with this.
Example 3. I'd say nested treegrid/tree is not same structure as its parent
tree/treegrid. So all items has first level.

Thanks.
Alexander.

On Wed, Feb 11, 2015 at 8:40 PM, Cynthia Shelly <cyns@microsoft.com> wrote:

>  I have some detailed questions about how to compute the aria-level when
> it is not explicitly set.  Is this documented anywhere?  I couldn’t find it.
>
>
>
> When it comes to computing the aria-level accessibility property when it
> is not specified by the author, I am unclear of what approach to use. I
> have looked at the following specs and could not find an answer:
>
> http://www.w3.org/TR/aria-role/states_and_properties#aria-level
>
>
> http://rawgit.com/w3c/aria/master/core-aam/core-aam.html#mapping_additional_position
>
>
>
> There is a clear methodology to compute the aria-posinset and aria-setsize
> properties, and a mention of computing aria-level for treeitem roles in
> ATK. I am looking for specifically how to compute the aria-level property
> for all the level-appropriate roles. I imagine the algorithm looks like
> “walk the parent chain and increase the level whenever you encounter X
> role(s)”. The problem I am having is determining exactly which roles
> increase the level for other roles. For example, is List the only role that
> increases the level for ListItem? Heading for Heading? Etc.  Should
> treeitem only look for tree ancestors? Listitems for lists? Headings for
> headings?
>
>
>
>
>
> Some examples:
>
>
>
> Example 1:  What is the expected computed level of each of the list
> items?  Li1 would be level 1, based on DOM position.  Would li2 be level 2
> because it is inside a second list?  Or level 4 because of the levels of
> DOM structure between it and li1?
>
>
>
> <div role=”list”>
>
>     <div id=li1 role=”listitem”>
>
>         <div role=”group”>
>
>             <div role=”list”>
>
>                 <div id=li2 role=”listitem”> </div>
>
>             </div>
>
>         </div>
>
>     </div>
>
> </div>
>
>
>
>
>
> Example 2: What is the expected computed level of each heading?  Of the
> grid and gridcell?
>
>
>
> <div id=head1 role=”heading”>
>
>     <div role=”group”>
>
>         <div id=grid1 role=”grid”>
>
>             <div id=gridcell1 role=”gridcell”>
>
>                 <div id=head2 role=”heading”></div>
>
>             </div>
>
>         </div>
>
>     </div>
>
> </div>
>
>
>
> Example 3:  What is the expected computed level of each treeitem and
> treegrid?
>
>
>
> <div role=”tree”>
>
>     <div role=”treeitem”>
>
>         <div role=”treegrid”>
>
>             <div role=”treeitem”>
>
>                 <div role=”tree”>
>
>                     <div role=”treeitem”></div>
>
>                 </div>
>
>             </div>
>
>         </div>
>
>     </div>
>
> </div>
>
>
>
>
>
>
>
> For reference, here are the roles that support aria-level
>
>
>
> *Characteristic*
>
> *Value*
>
> *Used in Roles:*
>
> ·         grid <http://www.w3.org/TR/aria-role/roles#grid>
>
> ·         heading <http://www.w3.org/TR/aria-role/roles#heading>
>
> ·         listitem <http://www.w3.org/TR/aria-role/roles#listitem>
>
> ·         row <http://www.w3.org/TR/aria-role/roles#row>
>
> ·         tablist <http://www.w3.org/TR/aria-role/roles#tablist>
>
> *Inherits into Roles:*
>
> ·         treegrid <http://www.w3.org/TR/aria-role/roles#treegrid>
>
> ·         treeitem <http://www.w3.org/TR/aria-role/roles#treeitem>
>
> *Value:*
>
> integer
> <http://www.w3.org/TR/aria-role/states_and_properties#valuetype_integer>
>
>
>
>
>
> Thanks,
>
> Cynthia
>

Received on Thursday, 12 February 2015 13:08:48 UTC