WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: aria-labelledby vs aria-activedescendant

for

From: Ney André de Mello Zunino
Date: Aug 22, 2011 1:27PM


On 22/08/2011 11:24, Bourne, Sarah (ITD) wrote:
> I have neither info nor experience, but it's tickling a memory of struggling with CSS for UL/LI a (very) long time ago. I was trying to set something at the container level (UL) but it was not carrying through to the items inside that container (the LIs.) I remember thinking that perhaps it was because the UL has no content other than other elements. If true, then this could be tripping up your example: it can't find direct content to use the label with. I would try adding the aria-labelledby to the list items since that's what worked for my CSS problem.
>
> (I assume you have a specific reason for not using the SELECT input, which screen readers know how to deal with.)

Thank you for your response, Sarah. I think I see your point. However,
after running a couple of additional experiments, I am still unable to
get aria-labelledby and aria-activedescendant to behave well when used
in conjunction. In other words, if the container widget uses
aria-activedescendant to indicate which of its child elements is the
currently active one, only that child element "is read", not the
container's label. On the other hand, if I have aria-labelledby on each
of the child elements, the label is read, but not the elements themselves.

I have uploaded the 2 files that make up the experiments at PasteBin.
The explanatory text in Brazilian Portuguese, but I will translate the
description of each included test here:

TEST 1: Menu with UL and LI markup (preferred option)
TEST 2: Menu with UL and LI markup but with aria-labelledby set for each
LI instead of the UL.
TEST 3: Menu with DIV markup.
TEST 4: Menu with DIV markup but with aria-labelledby set for each menu
item DIV instead of the container DIV.

[1] teste11.css => http://pastebin.com/k7rfycJC
[2] teste11.html => http://pastebin.com/25bgR9TN

Regards,

--
Ney André de Mello Zunino
Pesquisa e Desenvolvimento
Softplan/Poligraph
Sistema da Qualidade Certificado ISO9001:2008
Fone/Fax: 0xx(48) 3027-8000
http://www.softplan.com.br/