Accessibility · Middle · Question 11 of 75

Native required or aria-required: which should you prefer?

Show the answer

Correct answer: required, since it brings both semantics and validation

Explanation

required has semantics and validation. aria-required only announces. Using noValidate with required also works for custom error UIs.

Further reading

Problem with a question

Accessibility · Middle · question 11

Test yourself

Take the Accessibility · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz