|
41 | 41 | },
|
42 | 42 | //If an element is disabled, it is barred from constraint validation.
|
43 | 43 | //The willValidate attribute must be true if an element is mutable
|
44 |
| - //If the readonly attribute is specified on an INPUT element, the element is barred from constraint validation |
45 |
| - //(with the assumption that the readonly attribute applies). |
| 44 | + //If the readonly attribute is specified on an INPUT element, the element is barred from constraint validation. |
46 | 45 | {
|
47 | 46 | tag: "input",
|
48 | 47 | types: ["text", "search", "tel", "url", "email", "password", "datetime-local", "date", "month", "week", "time"],
|
|
53 | 52 | {conditions: {disabled: false, readOnly: false}, expected: false, name: "[target] The willValidate attribute must be false if it has a datalist ancestor", ancestor: "datalist"},
|
54 | 53 | ]
|
55 | 54 | },
|
56 |
| - //In the following cases, the readonly attribute does not apply. |
| 55 | + //In the following cases, the readonly attribute does not apply, however we should still bar the element from constraint validation. |
57 | 56 | {
|
58 | 57 | tag: "input",
|
59 | 58 | types: ["color", "file", "submit"],
|
60 | 59 | testData: [
|
61 | 60 | {conditions: {disabled: true}, expected: false, name: "[target] Must be barred from the constraint validation if it is disabled"},
|
62 | 61 | {conditions: {disabled: false, readOnly: false}, expected: true, name: "[target] The willValidate attribute must be true if an element is mutable"},
|
63 |
| - {conditions: {readOnly: true}, expected: true, name: "[target] Must be not barred from the constraint validation even if it is readonly"}, |
| 62 | + {conditions: {readOnly: true}, expected: false, name: "[target] Must be barred from the constraint validation if it is readonly"}, |
64 | 63 | {conditions: {disabled: false, readOnly: false}, expected: false, name: "[target] The willValidate attribute must be false if it has a datalist ancestor", ancestor: "datalist"},
|
65 | 64 | ]
|
66 | 65 | },
|
|
0 commit comments