aria-required attribute | ariaRequired property (Internet Explorer)

Switch View :
ScriptFree
aria-required attribute | ariaRequired property

[This documentation is preliminary and is subject to change.]

Sets or retrieves the form-completion requirement of this element.

Internet Explorer 8

Syntax

HTML
<element aria-required="p" ... >
JavaScript
object.setAttribute("aria-required",value);var value = object.getAttribute("aria-required");

Property values

Type: String

The form-completion requirement.

(true)

The element requires user input.

(false)

Default. The element may be left blank.

Remarks

The ariaRequired property indicates which input fields of a form must be filled in before it can be submitted. If the user attempts to submit the form without the required information, you may set ariaInvalid to indicate the error.

Note  For cross-browser compatibility, always use the WAI-ARIA attribute syntax to access and modify ARIA properties, for example object.setAttribute("aria-valuenow", newValue).

See also

Accessible Rich Internet Applications (ARIA)
W3C ARIA-Required

 

 

Build date: 2/13/2012