RE: CSS in Accessibility Name Computation (Was: a11y-outline available for Firefox)

Hi,
No problem. 

I'm confused though, can you tell me what you would expect the label to be with the following markup?

<label>
This is
<input id="lbl" />
<label for="lbl">is a test.</label>
</label>


Bryan Garaventa
Accessibility Fellow
Level Access, Inc.
Bryan.Garaventa@LevelAccess.com
415.624.2709 (o)
www.LevelAccess.com

-----Original Message-----
From: Tobias Bengfort [mailto:tobias.bengfort@posteo.de] 
Sent: Thursday, February 08, 2018 10:52 PM
To: Bryan Garaventa <bryan.garaventa@levelaccess.com>; jcraig@apple.com; Matthew King <mck@fb.com>; ARIA Working Group <public-aria@w3.org>
Cc: Aaron Leventhal <aleventhal@google.com>; Alexander Surkov <asurkov@mozilla.com>; Marco Zehe <marco.zehe@gmail.com>; David Bolter <david.bolter@gmail.com>; Dominic Mazzoni <dmazzoni@google.com>; Joseph Scheuhammer <clown@alum.mit.edu>; Michael Cooper <cooper@w3.org>; Tess O'Connor <hober@apple.com>; Joanmarie Diggs (jdiggs@igalia.com) <jdiggs@igalia.com>
Subject: Re: CSS in Accessibility Name Computation (Was: a11y-outline available for Firefox)

Thanks Bryan for all the work! I have just one quick remark:

On 09/02/18 01:54, Bryan Garaventa wrote:
> 3. Logic for handling nested label elements has been added, in which 
> an implicit label element surrounds a form field that also includes an 
> explicit form field reference somewhere else. There appears to be no 
> standard in the naming computation to address this, so I set this to 
> compute the explicit label and ignore the implicit one in such cases. 
> This seems logical to me, but if everybody wants this to be handled 
> differently it can be changed.

I think the standard is actually clear about this: All labels should be included in the name. A labelable element is associated with a label element if:

- the label element has a `for` attribute that matches the control's `id`
- the label element does not have a `for` attribute and the labelable element is the first labelable descendant of that label.

This means that there can be more than one label for a labelable element. These labels should be processed in source order.

Source: https://www.w3.org/TR/html52/sec-forms.html#the-label-element


thanks
tobias

Received on Friday, 9 February 2018 07:57:47 UTC