Bug 254102

Summary: AX: Form controls take the AX text of an ancestor label over their own inner text
Product: WebKit Reporter: Tyler Wilcock <tyler_w>
Component: AccessibilityAssignee: Tyler Wilcock <tyler_w>
Status: RESOLVED FIXED    
Severity: Normal CC: andresg_22, cfleizach, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Tyler Wilcock 2023-03-17 20:27:08 PDT
Given this HTML:

<fieldset>
    <label for="captchaAnswer">
        <h6>Enter the characters in the image below.</h6>
        <button>Switch to audio</button>
        <button>Try another</button>
        <input type="text" name="captchaAnswer"/>
    </label>
</fieldset>

VoiceOver reads "Enter the characters in the image below." when focusing both buttons, rather than either "Switch to audio" or "Try another".

Neither Chrome nor Firefox have the same issue.
Comment 1 Radar WebKit Bug Importer 2023-03-17 20:27:17 PDT
<rdar://problem/106886654>
Comment 2 Tyler Wilcock 2023-03-18 10:36:26 PDT
rdar://106575817
Comment 3 Tyler Wilcock 2023-03-18 10:42:39 PDT
Created attachment 465493 [details]
Patch
Comment 4 Tyler Wilcock 2023-03-19 01:32:33 PDT
Created attachment 465500 [details]
Patch
Comment 5 Tyler Wilcock 2023-03-19 01:34:09 PDT
I added "Reviewed by Chris Fleizach" to this patch because Chris gave an approving review in Slack but noted he couldn't r+ due to missing Bugzilla UI.
Comment 6 EWS 2023-03-19 12:28:38 PDT
Committed 261843@main (1c62bc2631a3): <https://commits.webkit.org/261843@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 465500 [details].