In an ASP.NET page, to dynamically add the HTML attributes such as aria-required to the input elements like checkbox, you can do this in the code:
myCheckBox.InputAttributes.Add("aria-required", "true");
Then the CheckBox are usually rendered like this:
Renders as:
<input type="checkbox" aria-required="true" />