This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29201 - Accessible Name Calculation of label
Summary: Accessible Name Calculation of label
Status: RESOLVED FIXED
Alias: None
Product: ARIA
Classification: Unclassified
Component: HTML AAM (show other bugs)
Version: Future
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: steve faulkner
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-14 00:21 UTC by Takeshi Kurosawa
Modified: 2018-05-03 20:33 UTC (History)
3 users (show)

See Also:


Attachments

Description Takeshi Kurosawa 2015-10-14 00:21:29 UTC
5.1.1 input type="text", input type="password", input type="search", input type="tel", input type="email", input type="url" and textarea Element Accessible Name Calculation
http://w3c.github.io/aria/html-aam/html-aam.html#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-url-and-textarea-element

and

5.5.1 Other Form Elements Accessible Name Calculation
http://w3c.github.io/aria/html-aam/html-aam.html#other-form-elements

mention

> Otherwise use the associated label element


However how to calculate accessible name from label elements is ambiguous.

Currently different User Agents have different implementations especially when multiple label elements are associated with a form control. Consider a following example:

<tr>
<th><label for="timeout">Extend time-out to</label></th>
<td><input id="timeout"><label for="timeout">minutes</label></td>
</tr>

Current User Agents' implementations are:

Firefox: "Extend time-out tominutes"
Chrome: "Extend time-out to"
Edge: "minutes"


My proposal is defining "use the associated label element" as follows:

- Set the accumulated text to the empty string.
- For each label element in |element.labels|:
    - Append label element subtree except its labeled control, with a space, to the accumulated text.
- Return the accumulated text.

Accessible Name of the above example will be "Extend time-out to minutes".

Note: Definition of |element.labels|
http://www.w3.org/TR/html51/semantics.html#dom-lfe-labels
Comment 1 James Nurthen 2018-05-03 20:33:04 UTC
This should be resolved. Please open a new github issue if still a problem