Re: Question regarding role=directory, the usage and purpose is unclear

I have never understood the rationale for having this role.
I don't see much value in it.
Interesting that there is no such thing as a directoryitem.
Also interesting that it has name from contents ... pretty odd for a 
structure.

Matt King
IBM Senior Technical Staff Member
I/T Chief Accessibility Strategist
IBM BT/CIO - Global Workforce and Web Process Enablement 
Phone: (503) 578-2329, Tie line: 731-7398
mattking@us.ibm.com



From:   Bryan Garaventa <bryan.garaventa@ssbbartgroup.com>
To:     W3C WAI Protocols & Formats <public-pfwg@w3.org>, 
Date:   04/12/2015 06:07 PM
Subject:        Question regarding role=directory, the usage and purpose 
is unclear



Hi,
I've been experimenting with TOC formats, and built out a somewhat complex 
one at
http://whatsock.com/training

Actually I wrote a script to do this, it would be nuts to do it by hand. 
It uses a simulated button, named Table of Contents, which includes 
aria-expanded to convey the correct state. The script iterates through all 
heading tags in a linear order from top to bottom, maps the levels, then 
builds out standard UL elements with the correct nesting order for all 
subgroupings.

I also have it set aria-label on each nested UL so that it conveys the 
parent association in the naming calculation, which I like the sound of, 
because as you arrow down the list using a screen reader with a virtual 
offscreen model like JAWS, it is clear in context which nesting level you 
are entering into or out of.

So I was looking at the ARIA spec, remembering that there was a directory 
role that should be applicable here too, documented at
http://www.w3.org/TR/wai-aria-1.1/#directory
But it's not clear to me how this should fit into my table of contents 
markup.

For example, it implies that this should be used on the list element, 
where it states:

"Superclass Role: list"

If I do this though, it destroys my list within the accessibility tree.

If instead I put it on the surrounding container, it doesn't appear to do 
anything.

So, does anybody know what role=directory is supposed to do and how it is 
supposed to be used?

Thanks,
Bryan

Received on Friday, 17 April 2015 11:38:46 UTC