-
Notifications
You must be signed in to change notification settings - Fork 530
Allow readonly
on checkboxes and radio buttons?
#92
Comments
[inclusive of Issue #91] On windows, readonly also doesn't work anywhere except for Chrome on Windows makes My interpretation of the spec's position on readonly is that it is intended to apply to textual input scenarios, and input controls that represent physical knobs and switches, etc., are not applicable to readonly. (This appears to be confirmed in the spec's text at Section 4.10.5.3.3.) Why we probably shouldn't allow readonly on these controls, taking radio buttons as an example: a readonly radio button would presumably remain interactive, allowing users to adjust the ui (toggle different radio buttons), however, these UI changes would of necessity be disconnected from their actual values. This would probably lead to user confusion given that 1) they wouldn't be able to visually inspect the current value, and 2) it may break expectations for what value is actually submitted when used in a form scenario. |
Also inclusive of Issue #89 |
If we allowed this, the Blink-based browsers make ranges non-interactive if they are |
@travisleithead is right about the current spec interpretation, but I think it is worth considering readonly for checkboxes and radio buttons too - with the proviso (as @chaals noted) that they are inoperational. The use case that comes to mind is reviewing previous form choices before final submission. The design pattern usually allows changes to be made by following a link to return to the original form. The UX gets a bit confusing when some fields can be interacted with and others not. |
I agree with this suggestion, to allow I've been spending most of my day today looking for an easy way to implement this, including digging through BugZilla tickets on why Firefox doesn't support this and W3C documents in the hopes of finding some justification for making this unnecessarily difficult. (In case you're wondering, I ended up using disabled radio buttons alongside |
As this is marked with 'incubate first' closing here, should be raised in WICG. |
Not sure if it works anywhere. There seems to be a use case for distinguishing between disabled and readonly, although it might be unnecessary complication. As far as I know it does work anywhere (only tested mac browsers though).
testcase
The text was updated successfully, but these errors were encountered: