<!DOCTYPE html>
<form>
<div aria-label="checkbox1" role="checkbox" aria-checked="false"></div>
<div aria-label="checkbox2" role="checkbox" aria-checked="true"></div>
<div aria-label="radio1" role="radio" aria-checked="false"></div>
<div aria-label="radio2" role="radio" aria-checked="true"></div>
<div aria-label="switch1" role="switch" aria-checked="false"></div>
<div aria-label="switch2" role="switch" aria-checked="true"></div>
</form>
<script>
function go() {
document.querySelector('div[aria-label=checkbox1]').setAttribute('aria-checked', true);
document.querySelector('div[aria-label=checkbox2]').setAttribute('aria-checked', 'mixed');
document.querySelector('div[aria-label=radio1]').setAttribute('aria-checked', true);
document.querySelector('div[aria-label=radio2]').setAttribute('aria-checked', false);
document.querySelector('div[aria-label=switch1]').setAttribute('aria-checked', true);
document.querySelector('div[aria-label=switch2]').setAttribute('aria-checked', false);
}
</script>