Create custom keyboard accessible checkboxes

Content Warning: This blog post contains gifs. I’ve seen a ton of designers make these GORGEOUS checkbox styles, but then you see them implemented and you can’t even select it using your keyboard. Let’s say we got this in our style guide from our desig…


This content originally appeared on a11y with Lindsey and was authored by a11y with Lindsey

Content Warning: This blog post contains gifs. I've seen a ton of designers make these GORGEOUS checkbox styles, but then you see them implemented and you can't even select it using your keyboard. Let's say we got this in our style guide from our designer. I've seen this implemented before and it looks gorgeous. However, when I press the tab key, it zips right past it. If this field is required, you're screwing over a bunch of your users. They use ::before or ::after pseudo-elements to make a pretty checkbox and use the :checked pseudo-class to determine the styling of the check itself. It looks cool, but the problem is that they use display: none on the checkbox input itself. When we do that, we make the checkbox itself invisible to the browser, making it unusable for those who…


This content originally appeared on a11y with Lindsey and was authored by a11y with Lindsey


Print Share Comment Cite Upload Translate
APA
a11y with Lindsey | Sciencx (2023-03-26T06:34:20+00:00) » Create custom keyboard accessible checkboxes. Retrieved from https://www.scien.cx/2018/11/27/create-custom-keyboard-accessible-checkboxes/.
MLA
" » Create custom keyboard accessible checkboxes." a11y with Lindsey | Sciencx - Tuesday November 27, 2018, https://www.scien.cx/2018/11/27/create-custom-keyboard-accessible-checkboxes/
HARVARD
a11y with Lindsey | Sciencx Tuesday November 27, 2018 » Create custom keyboard accessible checkboxes., viewed 2023-03-26T06:34:20+00:00,<https://www.scien.cx/2018/11/27/create-custom-keyboard-accessible-checkboxes/>
VANCOUVER
a11y with Lindsey | Sciencx - » Create custom keyboard accessible checkboxes. [Internet]. [Accessed 2023-03-26T06:34:20+00:00]. Available from: https://www.scien.cx/2018/11/27/create-custom-keyboard-accessible-checkboxes/
CHICAGO
" » Create custom keyboard accessible checkboxes." a11y with Lindsey | Sciencx - Accessed 2023-03-26T06:34:20+00:00. https://www.scien.cx/2018/11/27/create-custom-keyboard-accessible-checkboxes/
IEEE
" » Create custom keyboard accessible checkboxes." a11y with Lindsey | Sciencx [Online]. Available: https://www.scien.cx/2018/11/27/create-custom-keyboard-accessible-checkboxes/. [Accessed: 2023-03-26T06:34:20+00:00]
rf:citation
» Create custom keyboard accessible checkboxes | a11y with Lindsey | Sciencx | https://www.scien.cx/2018/11/27/create-custom-keyboard-accessible-checkboxes/ | 2023-03-26T06:34:20+00:00
https://github.com/addpipe/simple-recorderjs-demo