Bulma: `disabled` isn't an attribute on `label`

Created on 6 Dec 2018  路  7Comments  路  Source: jgthms/bulma


This is about Bulma.

Overview of the problem

This is about the Bulma CSS framework
I am sure this issue is not a duplicate

Description

disabled is not an attribute on a label element.

Steps to Reproduce

Specify disabled on a the label element of (e.g.) a radio button.

Expected behavior

is-disabled is a class on a label element.

Actual behavior

disabled is an attribute not a class.

stale

Most helpful comment

I should note that this makes using this attribute impossible with a tool like React which strips away unknown attributes: https://reactjs.org/warnings/unknown-prop.html

... React currently strips all unknown attributes, so specifying them in your React app will not cause them to be rendered.

All 7 comments

I should note that this makes using this attribute impossible with a tool like React which strips away unknown attributes: https://reactjs.org/warnings/unknown-prop.html

... React currently strips all unknown attributes, so specifying them in your React app will not cause them to be rendered.

@jgthms it's not too late to fix this before the 0.7.3 release. You just need to change:
https://github.com/jgthms/bulma/blob/8b60a4939379531b0a951e85142dbf12eba906dc/sass/elements/form.sass#L141 to a class (i.e. is-disabled).

(And, by the way, disabled is an attribute on fieldset, so the only problem element is label).

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Any interest in fixing this for 0.7.6?

I don't think we can just remove features others might have already implemented.
However that's not to say we can't extend this to add that functionality.
I will put up a pull request with these changes

This is also true for a.
Bulma started to use disabled attributes for disabling "link buttons" (in the course of fixing button-disabling, see an issue below) but it is not a valid usage of disabled.
https://github.com/jgthms/bulma/issues/276#issuecomment-325207050
Related: https://github.com/jgthms/bulma/issues/885

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

swamikevala picture swamikevala  路  3Comments

rogervila picture rogervila  路  3Comments

NurdinDev picture NurdinDev  路  3Comments

JenCant picture JenCant  路  3Comments

Laraveldeep picture Laraveldeep  路  3Comments