New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read-only
pseudo class behavior ambiguities in the documentation.
#29140
Comments
More context: The W3 forms specification page says: https://www.w3.org/TR/html401/interact/forms.html#adef-readonly
Further, 17.4 The INPUT element says:
Based on these constraints (that you can only expect this behavior to be consistent with the definition for text-based input elements), I think it is beneficial to call out these caveats similar to how the |
...but also the W3 spec seems... not consistent here. Maybe "read" is being treated as the opposite of "write." Yes you cannot write into a checkbox or radio, but that is a meaningful distinction from the "but cannot be modified by the user" criteria in the spec. |
See also: #27408, whatwg/html#9496 |
Yes, all that is not The |
Right, perhaps a description such as this would be better:
|
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/:read-only
What specific section or headline is this issue about?
:read-only
What information was incorrect, unhelpful, or incomplete?
The first paragraph states:
However, this is inaccurate. The
read-only
pseudo targets editable fields that do not accept text. This can be verified by the following code:Sample output. Note how the checkbox, despite being "editable by the user," is targeted by the read-only styles.
What did you expect to see?
I think this should be mentioned in the documentation. That read only has unexpected (at least from my perspective) behavior. This could be an ambiguity-related issue similar to what can occur with
in-range
or other input-type specific pseudos, but I believe the documentation could benefit from this clarity.Do you have any supporting links, references, or citations?
Not beyond the replicable code.
Do you have anything more you want to share?
No.
MDN metadata
Page report details
en-us/web/css/_colon_read-only
The text was updated successfully, but these errors were encountered: