cosmos
cosmos copied to clipboard
Review Switch design for accessibility
trafficstars
Is your feature request related to a problem? Please describe. Today, the switch has accessible labels but sometimes there are situations where these labels don't fit. Now, the prop to customize the labels can allow you to hide them, but this is not ideal.
Describe the solution you'd like
- If labels are hideable, there should be a prop for it, like 'hideLabels'. We should have a design that accounts for now having the labels, yet it is still accessible, something like what iOS does.
- We should review how we are conditionally rendering the label in code. I suggest: hiding it via CSS and keeping it in the DOM (with the default ON/OFF value)
We've done some work in https://github.com/auth0/cosmos/pull/1234 that brought this issue up