Required widgets

Rule ID Error 3
Definition If user input is required for a widget the aria-required attribute must must used.
Purpose
  • Users benefit from information being informed if a input to a widget is required for form submission or task completion.
Mappings
  • HTML5 and ARIA Techniques (Required)
WCAG Success Criteria

3.3.3 Error Suggestion (Level AA, Primary Success Criterion)

Rule Category Widgets/Scripting
Scope Element
Target Resources textarea and input[type="text"] elements, and ARIA textbox, gridcell and combobox widgets
Techniques
  • To identify a required widget, add the ARIA aria-required="true" attribute to the widget.
  • Use the aria-required attribute as the CSS selector for visually styling the widget as required. This ensures that the visual state stays synchronized with the accessibility API state used by assistive technologies.
  • Note the the HTML5 required attribute CANNOT be used to indicate that a widget is required, the requiured attribute can only be used on HTML5 defined form controls.
Informational Links