W3C home > Mailing lists > Public > public-pfwg-comments@w3.org > January to March 2008

Re: Structured HTML Precludes aria-posinset and aria-setsize?

From: Henri Sivonen <hsivonen@iki.fi>
Date: Fri, 28 Mar 2008 19:50:36 +0200
Message-Id: <E57CADC1-4037-4B7D-B685-80C09CE99D00@iki.fi>
To: Ben 'Cerbera' Millard <cerbera@projectcerbera.com>
Cc: public-pfwg-comments@w3.org

> If a tree is structured with the HTML elements for nested lists,  
> namely <ul>
> and <li>, these attributes become redundant?
>
> * setsize is available by counting the <li> at the current level.
> * posinset is available by counting the <li> at the current level up  
> to and
> including the current <li>.

Indeed, setsize/posinset don't appear to have a very HTML-like design.

I can think of two cases where counting the number of child elements  
of the container is not enough:
  1) Paged views (e.g. showing 20 messages of a mailbox containing  
thousands of messages and having only the 20 items in the DOM)
  2) Tree grids implemented as <table>s where some rows should not  
participate in the top level item count.

In both cases, I can think of a more author-friendly and HTML-like  
design.

In case #1, the container element needs two attributes: start and  
total. The position in set for a given item would be start + the  
number of previous element siblings. If start < 1 or missing, assume  
1. (One-based start as opposed to zero-based offset is consistent with  
<ol start>.) The attribute total gives the set size. If missing or if  
start + number of element children in the container - 1 > total, use  
start + number of element children in the container - 1 instead.

In case #2, rows in <thead> and <tfoot> should be ignored for the  
count as well as rows flagged as subrows.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Friday, 28 March 2008 17:51:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 28 March 2008 17:51:20 GMT