Skip to content

Commit

Permalink
Bug 1783760 [wpt PR 35389] - readonly attribute should still affect c…
Browse files Browse the repository at this point in the history
…onstraint validation on 'unsupported' types, a=testonly

Automatic update from web-platform-tests
readonly attribute should still affect constraint validation on 'unsupported' types (#35389)

See whatwg/html#8133 and whatwg/html#8089
--

wpt-commits: b7eb2920ba4cea3af51fdc4e11eddacd26f9a3ac
wpt-pr: 35389
  • Loading branch information
nt1m authored and moz-wptsync-bot committed Sep 4, 2022
1 parent adafff6 commit b583860
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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"},
]
},
Expand Down

0 comments on commit b583860

Please sign in to comment.