This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21708 - Errors with input element: readonly not accepted for type=text, defaulting of type not allowed
Summary: Errors with input element: readonly not accepted for type=text, defaulting of...
Status: RESOLVED FIXED
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-16 04:54 UTC by Jukka K. Korpela
Modified: 2015-08-23 07:07 UTC (History)
1 user (show)

See Also:


Attachments

Description Jukka K. Korpela 2013-04-16 04:54:01 UTC
<!DOCTYPE html>
<title>Sample 1</title>
<input type=text readonly>

This causes the error message “Attribute readonly not allowed on element input at this point.” The explanation that follows lists readonly as allowed when type is text, as it of course is.

<!DOCTYPE html>
<title></title>
<input readonly>

This causes the error message “Element input is missing one or more of the following attributes: type.”

There is apparently something odd with readonly for type=text: when the type attribute is specified explicitly, readonly is not allowed; and when readonly is specified, defaulting of type is not allowed.

<input type=search readonly> validates OK, and so does <input>.

Validator.nu does not have this bug.
Comment 1 Michael[tm] Smith 2013-04-16 06:34:51 UTC
https://bitbucket.org/validator/syntax/commits/a44fd5d89a88c728742ef17d659fe8733aff71dd

and pushed to the W3C validator

Thanks for catching this