The widget factory's implementation of _setOption( "disabled", newValue ) assigns two classes to the element returned by a widget implementation's widget() function: namespace-widgetname-disabled and ui-state-disabled.
So, we should do two things to take advantage of this functionality:
Implement .widget() for all our widgets. The default implementation in the widget factory returns this.element from .widget(), which means the above-mentioned classes will be assigned to this.element. This is not very useful for us, because we often wrap this.element in what is really the widget's outermost element, so we should override that method for those widgets that do that.
Rename our ui-disabled class to ui-state-disabled, so as to avoid duplicating the code from the widget factory. That is, our _setOption( "disabled", newValue ) implementations should not have to add/remove the class ui-disabled, when the widget factory already does that for us.
Are there still widgets where this needs to implemented? If so, I suggest we close this ticket and create new ones for each of those widgets and refer to this ticket.
I think we're good for 1.4.0, but we should keep this open for 1.5.0 so we don't forget to remove all references to ui-disabled, even from the CSS.
In fact, the widget factory no longer adds ui-state-disabled, but only ui--disabled, so we need to rethink that as well.
Closing this we have addressed this everywhere