Fixes persistent keyboard issues with checkbox and radio button "buttons" https://getbootstrap.com/docs/4.3/components/buttons/#button-plugin
Instead of setting the "checked" state on click (which doesn't happen when navigating with the keyboard), this relies on checkboxes and radio
buttons just doing their normal thing, and then simply sets the relevant .active
class.
Similarly, it simplifies the handling/differentiation for toggles using aria-pressed
Closes https://github.com/twbs/bootstrap/issues/28564 Closes https://github.com/twbs/bootstrap/issues/26855
(pro-tip to test if keyboard is being handled correctly: for the checkbox and radio button buttons, use devtools, find the nested input
, and disabled the position:absolute
rule in the relevant CSS ... now you can see exactly if a radio or checkbox gets toggled properly or not)