Bug report / Feature request
With native HTML <input> and <button>, the elements are not focusable when disabled. Arguably, the same behavior should be reflected in the Base UI form components like Field, Input, Select, Autocomplete, Combobox, etc. This could be achieved by removing data-focused when data-disabled is added.
The current Tailwind workaround is to use a not-data-disabled:data-focused: ... modifier, or focus-visible: ... in cases where that would actually work instead. However, I don't think this is something consumers should have to implement. I don't think users expect data-focused to persist when data-disabled.
I do like that the Button component has the focusableWhenDisabled prop and it correctly defaults to false. This could be added to the form-related components, but I don't think there's a strong need. The primary issue is simply the persistence of data-focused.
Thanks for your help.
Bug report / Feature request
With native HTML
<input>and<button>, the elements are not focusable when disabled. Arguably, the same behavior should be reflected in the Base UI form components likeField,Input,Select,Autocomplete,Combobox, etc. This could be achieved by removingdata-focusedwhendata-disabledis added.The current Tailwind workaround is to use a
not-data-disabled:data-focused: ...modifier, orfocus-visible: ...in cases where that would actually work instead. However, I don't think this is something consumers should have to implement. I don't think users expectdata-focusedto persist whendata-disabled.I do like that the
Buttoncomponent has thefocusableWhenDisabledprop and it correctly defaults tofalse. This could be added to the form-related components, but I don't think there's a strong need. The primary issue is simply the persistence ofdata-focused.Thanks for your help.