-
-
Notifications
You must be signed in to change notification settings - Fork 834
feat: formAssociated element should treat boolean "disabled" Prop differently #5461
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
If the component has set formAssociated: true and a boolean disabled Prop the component should not add this as a attribute if disabled=false is set.
Describe the Use Case
We have formAssociated elements which should emit the click event if the user clicks on it. This should also work if disabled=false is set.
For formAssociated elements the value of disabled is not respected like described here: https://html.spec.whatwg.org/dev/form-control-infrastructure.html#attr-fe-disabled:~:text=custom%20element%2C-,and%20the,attribute%20is%20specified%20on%20this%20element%20(regardless%20of%20its%20value),-%3B%20or
Describe Preferred Solution
If formAssociated: true and disabled=false is set, the attribute should not be present.
Describe Alternatives
No response
Related Code
Reproducer: https://github.com/danyball/stencil-noevent.git
Additional Information
Closed Mozilla bug ticket (not sure if related): https://bugzilla.mozilla.org/show_bug.cgi?id=1818287