Demo 2.3: Form validation using ARIA


Show fixes and notes

Fixes

  • aria-required used to mark required field (ARIA2).
  • aria-invalid used to dynamically mark invalid field.
  • aria-describedby used to connect error messages to field.

Notes

  • See Accessible Form Labeling & Instructions by Karl Groves for a general overview.
  • There are many other approaches, e.g. Simple Form Validation Using Only WAI-ARIA role=alert or aria-live=assertive by Paul J Adam.
  • As older browsers and/or screen readers lack support, ARIA attributes are generally supposed to be used as progressive enhancement.
  • Have a look at ARIA Guidance by the SSB Bart Group for details on the formalities («ARIA is not yet a formal recommendation of the W3C – it is still a candidate recommendation. […] Use of ARIA is an advisory technique.».

Forward to "Demo 2.4: HTML5 form validation" » « Back to "Demo 2.2: Accessible form" Index