How do I make a CSS toggle switch accessible?
Use a real checkbox input with role="switch", keep it focusable instead of hiding it with display:none, and give it a visible text label. Add a focus-visible outline on the track so keyboard users can see where focus is, and turn off the sliding transition inside a prefers-reduced-motion media query.