DEV Community

Tobias Schächtelin
Tobias Schächtelin

Posted on

CSS <label> pseudo-content trick

Inspired by the Inclusive Components by Heydon Pickering and the pseudo-content trick for inclusive card components, I implemented this approach with radio buttons:

https://codepen.io/tschach/full/PowvmRK

I would be very interested in discussing whether this is a valid option and what could be improved. So if you have any feedback on the semantics, let me know!

I also tweeted about it, so feel free to leave your feedback there:

Top comments (0)