Add disabled support to moz-checkbox
Categories
(Toolkit :: UI Widgets, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: mstriemer, Assigned: tgiles)
References
(Blocks 1 open bug)
Details
(Whiteboard: [recomp])
Attachments
(1 file)
Checkboxes can be disabled, therefore we should support the disabled
attribute/property in moz-checkbox
Updated•5 months ago
|
Assignee | ||
Updated•4 months ago
|
Assignee | ||
Comment 1•4 months ago
|
||
This change adds the "disabled" state to moz-checkbox. This involves
setting disabled on the host element, the label element, and the
checkbox. Since label elements do not support the disabled attribute,
I needed to set the property and the attribute (?disabled, .disabled).
By setting the HTML attribute, we can style the label when moz-checkbox
is disabled.
I could simplify the label to use only the HTML attribute (?disabled),
but then I'd need to rewrite the tests. I don't have a strong opinion on
this, so if we prefer just the HTML attribute, I'm happy to make that
change.
This patch also sets the disabled text color to GrayText, as we don't
have a token for the combination currently in Figma (#5b5b66, #cfcfd8)
but happy to add that combination if we want that. I was unable to find
an existing token for #cfcfd8, which is why I went with the system
color GrayText.
Pushed by tgiles@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a1e4a50f2b35 Add disabled state to moz-checkbox. r=reusable-components-reviewers,mstriemer
Comment 3•4 months ago
|
||
bugherder |
Description
•