No JS needed!
States can be styled via pseudos & attrs: :focus, input[disabled], :checked
:focus
input[disabled]
:checked