theme-toggles icon indicating copy to clipboard operation
theme-toggles copied to clipboard

Checkbox can't be used with keyboard

Open joppekroon opened this issue 2 years ago • 1 comments

In the CSS for the checkbox solution, the checkbox is set to display:none;. This makes it impossible to reach and interact with using the keyboard. Using the screen reader only class on the checkbox in the HTML instead solves that issue.

Then there is a further issue that there is no focus indicator. This can be solved by adding an outline to the SVG when the checkbox is focused. You could use :focus-visible if you don't want the outline when people use a mouse.

joppekroon avatar Feb 24 '23 10:02 joppekroon

I will make sure this is fixed in the latest version. Thanks for all the great feedback

AlfieJones avatar Feb 27 '23 11:02 AlfieJones