DEV Community

loading...

Discussion on: Create custom keyboard accessible checkboxes

Collapse
marekozw profile image
..

Hi! great article. But have you tried this out on iPhone? left: -99999px might be considered as out of view port, so clicking on checkbox might not work.

Collapse
lkopacz profile image
Lindsey Kopacz Author

That's a good point! Need to test it more! Signing into the day job now, but will report back!

Collapse
pr0da profile image
David Prokaj

clip: rect(0,0,0,0); may solve this instead of left

Collapse
link2twenty profile image
Andrew Bone

I like doing

[type=checkbox] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
Collapse
lkopacz profile image
Lindsey Kopacz Author

Yeah, I used to use clip more, must have slipped my brain.

The good news though is you're thinking about ensuring that the checkbox will work, both minds in the right place :D