JSFiddle - React, Tailwind, and code Playground
by tuga
HTML
<input type="checkbox" aria-required="True" />
<input type="text" aria-required="True" />
JavaScript
var InputElements = document.getElementsByTagName('input'); for (i=0; i<InputElements.length; i++){if(InputElements[i].getAttribute('aria-required') == 'true' ){InputElements[i].checked=true;}}