<label> should treat descendants of <audio> and <video> with a controls attribute as interactive content
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox77 | --- | affected |
People
(Reporter: TimothyGu, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36
Steps to reproduce:
<!doctype html>
<label>
<button onclick="alert('bad')">Don't click</button>
<audio controls><!-- or <video> -->
<div id=div>Click</div>
</audio>
<script>
document.getElementById("div").click();
</script>
</label>
(https://github.com/web-platform-tests/wpt/pull/22749)
Actual results:
The button got clicked by the JavaScript.
Expected results:
The button should not get clicked, as the div should be considered interactive content, and the HTML Standard says that the activation behavior of the label with events targeted at interactive content descendants (or their descendants) of label must be a no-op.
Chrome and Safari behave like the spec.
My suspicion that the element->GetFlattenedTreeParentElement() when called on the div element does not return the audio element, as the audio element's controls may be implemented using shadow DOM technologies.
| Reporter | ||
Updated•5 years ago
|
| Reporter | ||
Updated•5 years ago
|
| Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)
Description
•