You might not need JavaScript
I&#x27;m cautious about using CSS to do things that feel like actual behaviours.<p>For example, the modal that appears when you click on the button actually doesn&#x27;t do things on &quot;clicking&quot; but <i>focusing</i>. This means if you tab over the button it&#x27;ll load the modal, then tabbing away means the modal is gone. I can&#x27;t tab into the content in the modal at all. How does that work with accessibility?<p>Though I generally dislike the idea of saying content isn&#x27;t there by making it <i>present in the document</i> but <i>invisible</i>.<p>Edit - Some of the default behaviours are also a bit pants. In chrome, the form validation on a pattern starts working after I hit submit, then angrily shakes at me for every keypress until it&#x27;s valid. Then, it ignores invalid input as I type more! Please never use this for phone numbers or credit card numbers. Stop requiring an exact format when what people type varies, and stop telling me I&#x27;m putting in something wrong when you ask for a phone number and I give you something that&#x27;ll connect to me if you type into a phone.<p>Maxlength is not a validation it&#x27;s just ignores any more letters you type. Quietly ignoring your users input is probably not what you want.<p>The &quot;Would you prefer a banana or a cherry?&quot; just shouts &quot;Please match the requested format&quot; if I type &quot;a cherry&quot;. I know chrome has nothing else to go on other than &quot;the regex wasn&#x27;t matched&quot; but it&#x27;s a bad end user experience.<p>The tabs example is something I need to tab onto then use left and right, I assume because it&#x27;s a radio box underneath, not a series of links. Are tabs really radio buttons?<p>The same for the accordion. Which I&#x27;ve found if I add any tabbable content inside them then I&#x27;m focused on a <i>hidden item</i>. Great. Tab onto &quot;tab 1&quot;, hit tab, focus has disappeared and I&#x27;m now potentially going to click on random items I can&#x27;t see. This is because although you want to pretend the content isn&#x27;t there just because it&#x27;s not visible, it&#x27;s still there! It&#x27;s in your document.<p>Sure, you might not <i>need</i> javascript. But maybe you should still use it.