When I try to validate the following HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>test page</title>
</head>
<body>
<input type="text" name="testInput" value="test value" readonly="readonly" style="background-color: #e3e3e3;">
</body>
</html>
The validator gives the error:
Line 8, Column 118: Attribute readonly not allowed on element input at this point.
But in the error details it says:
readonly when type is text, ...
As this is a text input, why am I receiving the validation error?
searchandemailwork just fine. WHATWG confirms thatreadonlyis valid here; it also states thattextandsearchare nearly identical functionally, leading me to question further why the W3's validator would acceptsearchbut nottext.