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

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

From: Cynthia Shelly <cyns@microsoft.com>
Date: Thu, 12 Feb 2015 01:40:05 +0000
To: W3C WAI Protocols & Formats <public-pfwg@w3.org>, "wai-xtech@w3.org" <wai-xtech@w3.org>
Message-ID: <BLUPR03MB1660ACD7F4A936468546CFEC6220@BLUPR03MB166.namprd03.prod.outlook.com>
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 01:40:36 UTC

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