Bug 259977 - AX: Associated labels not read when one is hidden
Summary: AX: Associated labels not read when one is hidden
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari 16
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-09 08:34 PDT by Andrew
Modified: 2023-08-09 08:34 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew 2023-08-09 08:34:28 PDT
If you have multiple labels with the same "for" property, but the first one is hidden, VoiceOver on Mac with Safari does not read the visible label (or any label at all). Chrome with VoiceOver works fine.

The below code will read "edit text, blank" in Safari on Ventura 13.5  instead of "Test Two, edit text" as Chrome does. 

<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Test</title>
</head>
<body>
    <label style="display:none" for="test1">Test One</label>
    <label for="test1">Test Two</label>
    <input id="test1" name="test1">
</body>
</html>
Comment 1 Radar WebKit Bug Importer 2023-08-09 08:34:36 PDT
<rdar://problem/113631557>