Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Pure CSS toggle Web component (github.com/rajasegar)
9 points by rajasegarc on Oct 7, 2018 | hide | past | favorite | 5 comments



I never use those anymore because I discovered a lot of people don't know how to use them.

They see it as slide, so what happens is that they try to slide the thing. This causes events like 'releaseOutside' so nothing happens.

The other thing is that with most designs the state isn't obvious. 'Does the check mark mean I should slide to the mark to activate it?'

So yeah, it looks nice but most (older) people don't know how to use them


> The other thing is that with most designs the state isn't obvious. 'does the check mark mean I should slide to it to activate it?'

The author solved that in the custom options section, labeling ON and OFF state.


It's hardly "pure css" when the page doesn't show the controls without javascript enabled.


This does not look accessible. It should probably be focusable with tab navigation.

Otherwise pretty impressive.


they seem to be focusable with tab navigation, but there is no indication (dashed outline) of which element is selected. I was able to tab through and toggle the switches with the spacebar in Firefox.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: