Truly independent web browser
LibWeb: Stop label control lookup at the first matching ID
Andreas Kling637777d7d6da
diff --git a/Tests/LibWeb/Text/expected/HTML/label-first-id.txt b/Tests/LibWeb/Text/expected/HTML/label-first-id.txtindex 394c4b6e508..0269ee796e7 100644--- a/Tests/LibWeb/Text/expected/HTML/label-first-id.txt+++ b/Tests/LibWeb/Text/expected/HTML/label-first-id.txt@@ -1,4 +1,4 @@-First matching element blocks association (http://www.w3.org/1999/xhtml): false+First matching element blocks association (http://www.w3.org/1999/xhtml): trueRemoving the first match exposes the control (http://www.w3.org/1999/xhtml): true-First matching element blocks association (http://www.w3.org/2000/svg): false+First matching element blocks association (http://www.w3.org/2000/svg): trueRemoving the first match exposes the control (http://www.w3.org/2000/svg): truediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-label-element/label-attributes.sub.txt b/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-label-element/label-attributes.sub.txtindex b3cb7bfdb3c..1d96cabcbcd 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-label-element/label-attributes.sub.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-label-element/label-attributes.sub.txt@@ -2,13 +2,13 @@ Harness status: OKFound 20 tests-16 Pass-4 Fail+17 Pass+3 FailPass A label element with a 'for' attribute should only be associated with a labelable element.Pass A label element not in a document can not label any element in the document.Pass The labeled control for a label element that has no 'for' attribute is the first labelable element which is a descendant of that label element.Pass The 'for' attribute points to an inexistent id.-Fail A non-control follows by a control with same ID.+Pass A non-control follows by a control with same ID.Pass The 'for' attribute is an empty string.Pass A form control has multiple labels.Pass A labelable element is moved to outside of nested associated labels.