ARIA DOM Properties: Setting Values

Setting ARIA Role
Attribute role
setAttribute e.setAttribute("role", "checkbox");
DOM Property (ARIA 1.2) e.role = "checkbox";1
Setting aria-label property
Attribute aria-label
getAttribute e.setAttribute("aria-label", "My label");
DOM Property (ARIA 1.2) e.ariaLabel = "My label";1
Setting aria-checked state
Attribute aria-checked
setAttribute e.setAttribute("aria-checked", "true");
DOM Property (ARIA 1.2) e.ariaChecked = "true";1

1NOTE: Currently must be set using the AOM DOM property to return a value reliably and as in setting only available on the most recent browser releases.