From b58386021432546d9b44841c332bcc668e57a4fa Mon Sep 17 00:00:00 2001 From: Tim Nguyen Date: Sat, 3 Sep 2022 09:07:27 +0000 Subject: [PATCH] Bug 1783760 [wpt PR 35389] - readonly attribute should still affect constraint validation on 'unsupported' types, a=testonly Automatic update from web-platform-tests readonly attribute should still affect constraint validation on 'unsupported' types (#35389) See https://github.com/whatwg/html/issues/8133 and https://github.com/whatwg/html/issues/8089 -- wpt-commits: b7eb2920ba4cea3af51fdc4e11eddacd26f9a3ac wpt-pr: 35389 --- .../forms/constraints/form-validation-willValidate.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/testing/web-platform/tests/html/semantics/forms/constraints/form-validation-willValidate.html b/testing/web-platform/tests/html/semantics/forms/constraints/form-validation-willValidate.html index ccd1cf09b907b..c1abf76b65645 100644 --- a/testing/web-platform/tests/html/semantics/forms/constraints/form-validation-willValidate.html +++ b/testing/web-platform/tests/html/semantics/forms/constraints/form-validation-willValidate.html @@ -41,8 +41,7 @@ }, //If an element is disabled, it is barred from constraint validation. //The willValidate attribute must be true if an element is mutable - //If the readonly attribute is specified on an INPUT element, the element is barred from constraint validation - //(with the assumption that the readonly attribute applies). + //If the readonly attribute is specified on an INPUT element, the element is barred from constraint validation. { tag: "input", types: ["text", "search", "tel", "url", "email", "password", "datetime-local", "date", "month", "week", "time"], @@ -53,14 +52,14 @@ {conditions: {disabled: false, readOnly: false}, expected: false, name: "[target] The willValidate attribute must be false if it has a datalist ancestor", ancestor: "datalist"}, ] }, - //In the following cases, the readonly attribute does not apply. + //In the following cases, the readonly attribute does not apply, however we should still bar the element from constraint validation. { tag: "input", types: ["color", "file", "submit"], testData: [ {conditions: {disabled: true}, expected: false, name: "[target] Must be barred from the constraint validation if it is disabled"}, {conditions: {disabled: false, readOnly: false}, expected: true, name: "[target] The willValidate attribute must be true if an element is mutable"}, - {conditions: {readOnly: true}, expected: true, name: "[target] Must be not barred from the constraint validation even if it is readonly"}, + {conditions: {readOnly: true}, expected: false, name: "[target] Must be barred from the constraint validation if it is readonly"}, {conditions: {disabled: false, readOnly: false}, expected: false, name: "[target] The willValidate attribute must be false if it has a datalist ancestor", ancestor: "datalist"}, ] },