aria-required attribute is used to indicate that user input is required on an element before a form can be submitted. This attribute can be used with any typical HTML form element; it is not limited to elements that have an ARIA
HTML5 now has the
required attribute, but aria-required is still useful for user agents that do not yet support HTML5.
Possible effects on user agents and assistive technology
Screen readers should announce the field as required.
Note that this attribute will not automatically change the presentation of the field.
Example 1: A simple form
<form action="post"> <label for="firstName">First name:</label> <input id="firstName" type="text" aria-required="true" /> <br/> <label for="lastName">Last name:</label> <input id="lastName" type="text" aria-required="true" /> <br/> <label for="streetAddress">Street address:</label> <input id="streetAddress" type="text" /> </form>
Tooltip example (includes the use of the
Used in ARIA roles
Related ARIA techniques
TBD: Add support information for common UA and AT product combinations