W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > October to December 2015

RE: ARIA Problem

From: Bryan Garaventa <bryan.garaventa@whatsock.com>
Date: Tue, 24 Nov 2015 17:07:27 -0800
To: "'Batusic, Mario'" <mario.batusic@fabasoft.com>, <w3c-wai-ig@w3.org>
Message-ID: <00c201d1271d$acc34bf0$0649e3d0$@whatsock.com>

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



As opposed to a structural construct such as List, at


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,




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

This archive was generated by hypermail 2.3.1 : Wednesday, 25 November 2015 01:07:59 UTC