Bug 254812

Summary: AX: wrong computed accessible name for input with multiple labels associated
Product: WebKit Reporter: Giacomo Petri <giacomo.petri>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: andresg_22, tyler_w, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: All   
OS: All   
Attachments:
Description Flags
Screenshot showing how Safari compute the acc name with "This" instead of "This is a label" none

Description Giacomo Petri 2023-03-31 07:49:46 PDT
Created attachment 465700 [details]
Screenshot showing how Safari compute the acc name with "This" instead of "This is a label"

*Steps to reproduce:*

Code:

<label for="label">This</label>
<label for="label">is</label>
<label for="label">a</label>
<label for="label">label</label>
<input type="text" name="lb" id="label">


*Actual result:*

The computed accessible name is: "This"


*Expected result:*

Per https://www.w3.org/TR/html-aam-1.0/#accname-computation, section 4.1.1, point 2

"Otherwise use the associated label element or elements accessible name(s) - if more than one label is associated; concatenate by DOM order, delimited by spaces."

the computed accessible name should be: "This is a label" (concatenate by DOM order, delimited by spaces)
Comment 1 Radar WebKit Bug Importer 2023-03-31 07:49:55 PDT
<rdar://problem/107471926>
Comment 2 Tyler Wilcock 2023-07-15 15:52:59 PDT

*** This bug has been marked as a duplicate of bug 152663 ***