I'm trying to make a form accessible. Should I make my inputs have both required
and aria-required
attributes, or just one?
<label for="textbox1">Input</label>
<input id="textbox1" type="text" name="Text Box" required>
Or like this?
<label for="textbox1">Input</label>
<input id="textbox1" type="text" name="Text Box" aria-required="true">
Or like this?
<label for="textbox1">Input</label>
<input id="textbox1" type="text" name="Text Box" aria-required="true" required>
The article Accessible HTML5 Forms – Required Inputs claims it is best to implement both.
EDIT: The above linked site is no longer active.