RE: ARIA Problem

Hi,

The Listbox role is analogous to a standard HTML select element, and as such does support being empty if nothing is currently
contained within it.

 

The role mappings when an Option is present however, require that selectable Option nodes be children of the Listbox container,
whether as embedded children or mapped explicitly using aria-owns if not.

 

In practice, the most reliable usage presently is to make sure that Option nodes are embedded within the same container though.

 

Then you can set focus to the role=listbox container and use the arrow keys to change selection and update aria-activedescendant
accordingly to point to the ID of each selected role=option element, or use roving tabindex to set focus to each role=option element
individually using the arrow keys to change focus between them.

 

The aria-selected attribute is used to specify which role=option element is selected within the Listbox.

 

It's also important to assign an explicit label for the role=listbox container, in the same way that you would label a form field.
This can be done using aria-label or aria-labelledby. Supplementary descriptions can be assigned using aria-describedby too if
applicable. This is true regardless if the Listbox is empty of Options or not.

 

If it's helpful, I've mapped out the role and attribute hierarchies for Listbox at

http://whatsock.com/training/matrices/#listbox

 

As opposed to a structural construct such as List, at

http://whatsock.com/training/matrices/#list

Which is directly analogous to an HTML ul element.

 

It's important for people not to get the two of these confused.

 

Does this help?

 

All the best,

Bryan

 

 

From: Batusic, Mario [mailto:mario.batusic@fabasoft.com] 
Sent: Tuesday, November 24, 2015 3:02 AM
To: w3c-wai-ig@w3.org
Subject: ARIA Problem

 

Dear ARIA Specialists,

 

I have a fundamental problem with ARIA (also not yet better in ARIA 1.1):

An element with role=listbox requres at least one descendant with role=option. But I have to implement a selectable list (listbox)
that very often can be empty. The HTML solves this for static lists allowing for <ul>-elements to be without contents.

 

Is there some other possibility to solve the empty list problem without optimizing the definition for the listbox role?

Thanks in advance!

 

Ciao     Mario

 

Received on Wednesday, 25 November 2015 01:07:58 UTC