The new year has just begun, and we’re already speeding ahead with new features in Firefox trunk nightlies, AKA version 3.2a1pre. These features won’t see inclusion in Firefox 3.1, but are already the next generation features.
The feature I’m going to report on today has to do with position information and nesting level information of ordered and unordered HTML lists.
To give you an example:
As you can see here, the unordered list is nested within the ordered list. The ordered list has a level of 1, the unordered a level of 2. Also, in case of the unordered list where a number is not provided, there is still an item count that we expose.
The information is exposed in a similar manner as listbox items, combobox entries, or TreeView element information. We have the following object attributes:
- posinset – to specify the position within the set
- setsize – the size of the set of items
- level – specifies the nesting level
We also specify level and position information in the AccessibleDescription for convenience of screen readers that don’t use object attributes yet. So, the inner “Bananas” item has a description of “L2, 2 of 3″, just like a TreeView item would.
But my screen reader already has nesting level and item count information, so why bother?
Well…Because we’re nice! We save newly supporting screen readers or those that don’t want to calculate these values themselves the trouble and do it for them. We know the underlying HTML anyway and can provide the information while building the accessible tree. There is no need to go in and calculate these items yourself any more, or you don’t even need to start doing it. Just use our values if you want to give your users this information.