When coding radio buttons and checkboxes
How do you guys make it?

Until now, the method was to display: none;input and create a design with label ... but it became a story that Tab operation could not be performed and usability was not good.

I thought it was reasonable, so now
・ Tab operation is possible
・ When the radio button or check box is focused, you can see that it was focused (a design with a dotted line around it)
I'm looking for a way to make a radio button/checkbox of the same type?

I think CSS alone is strict, so I searched for a method for JS and jQuery, but I couldn't find it.
I found a plug-in, but I can't change the design freely, so I'd like to make it myself if possible.

I would appreciate it if you could borrow your wisdom.

// Addendum
I'm sorry, I solved it myself.
I was looking for a method like the one above ...!

I'm sorry for the question that is difficult to understand because there is no concrete example. ..