react-toggle-dark-mode icon indicating copy to clipboard operation
react-toggle-dark-mode copied to clipboard

Should be accessible via keyboard

Open VipEvel opened this issue 3 years ago • 1 comments

What can be done is wrap it in a button or an anchor tag and pass the click function else you can make it like it will use onclick function if defined otherwise checked variable will have the value from props.

https://github.com/JoseRFelix/react-toggle-dark-mode/blob/91c575e3d6a6826e953091b6e467574cb651857b/src/index.tsx#L96

VipEvel avatar Sep 22 '22 04:09 VipEvel

I agree. The SVG icon needs to be wrapped in a button element.

twilkinson24 avatar Feb 02 '23 01:02 twilkinson24