You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Slider Component carries incorrect TailwindCSS classes to support the @radix-ui/react-slider implementation, because the implementation (correctly) doesn't utilize a disabled attribute (those are only available to INPUTs, not SPANs, as implemented).
The Slider generator currently uses disabled: TailwindoCSS classes which fail to match because the disabled attribute isn't utilized. Rather, it should be using aria-disabled: classes on the SliderPrimitive.Root, as the root element is flagged with aria-disabled="true". If the Slider handle is intended to be targeted (disabled:pointer-events-none), the SliderPrimitive.Thumb should instead carry the data-[disabled]:pointer-events-none TailwindCSS class, as that element uses data-disabled.
Additionally, the Label Component fails to recognize and visually represent the disabled state of Slider, because of the lack of disabled attribute. I don't have a great suggestion here. Ideally, the Label would be extended to included a peer-aria-disabled, but that becomes based on DOM positioning and the Slider carrying a peer class which cannot be assumed. 🫤
Affected component/components
Slider
How to reproduce
Generate a new Slider component
Add the Slider component to a page
Disable the Slider component
Note there is no visual differentiation between disabled or enabled, the cursor doesn't change, and pointer events still trigger.
Codesandbox/StackBlitz link
No response
Logs
N/A
System Info
N/A
Before submitting
I've made research efforts and searched the documentation
I've searched for existing issues
The text was updated successfully, but these errors were encountered:
Describe the bug
The
Slider
Component carries incorrect TailwindCSS classes to support the @radix-ui/react-slider implementation, because the implementation (correctly) doesn't utilize adisabled
attribute (those are only available to INPUTs, not SPANs, as implemented).The Slider generator currently uses
disabled:
TailwindoCSS classes which fail to match because the disabled attribute isn't utilized. Rather, it should be usingaria-disabled:
classes on theSliderPrimitive.Root
, as the root element is flagged witharia-disabled="true"
. If the Slider handle is intended to be targeted (disabled:pointer-events-none
), theSliderPrimitive.Thumb
should instead carry thedata-[disabled]:pointer-events-none
TailwindCSS class, as that element usesdata-disabled
.Additionally, the
Label
Component fails to recognize and visually represent the disabled state of Slider, because of the lack ofdisabled
attribute. I don't have a great suggestion here. Ideally, theLabel
would be extended to included apeer-aria-disabled
, but that becomes based on DOM positioning and the Slider carrying apeer
class which cannot be assumed. 🫤Affected component/components
Slider
How to reproduce
Codesandbox/StackBlitz link
No response
Logs
System Info
Before submitting
The text was updated successfully, but these errors were encountered: