About This HTML Issue
The readonly attribute is a boolean attribute, so it takes no value: readonly="true" is invalid, and so is any value other than an empty string or readonly itself.
The HTML standard allows three forms for a boolean attribute: the bare name (readonly), an empty value (readonly="") and the name as its own value (readonly="readonly"). Browsers only check whether the attribute is there. readonly="false" still makes the field read-only, which surprises anyone who wrote it to switch the attribute off. To make the field editable, leave the attribute out.
The "true" value usually comes from a template or a JavaScript framework that prints a boolean variable as text, or from markup copied from the DOM, where input.readOnly = true is correct. In HTML, print the attribute when the field should be read-only and skip it when it shouldn't.
Invalid example
<label for="order-id">Order number</label>
<input type="text" id="order-id" name="order-id" value="A-1042" readonly="true">
Valid example
<label for="order-id">Order number</label>
<input type="text" id="order-id" name="order-id" value="A-1042" readonly>
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.