WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: A simple beginner's question

for

From: Léonie Watson
Date: May 23, 2016 2:22AM


> From: WebAIM-Forum [mailto: <EMAIL REMOVED> ]
> On Behalf Of Mike Barlow
> Sent: 22 May 2016 21:47
> And as for using ARIA to inform a user that an error has occurred on an input
> field, I'd use the ARIA "role=alert" (or even aria-live=assertive) as shown in
> the W3C page on identifying errors - https://www.w3.org/TR/WCAG20-
> TECHS/ARIA19.html
>
This technique does not associate an error message with a particular form field, it only notifies the user when an error has occurred. It also requires client side form validation, so may not be suitable for Alexander's purposes.

Imagine a form with several fields. You move focus away from one field and an error occurs, this causes an error message to be injected into the live region and your screen reader announces it. You move focus back to the field in question, but there is no error message associated with the field - so no way to remind yourself of the error that needs correcting.

The live region uses ARIA to do something that isn't possible in HTML, but it's only useful when it complements something that can (and probably should) be done in HTML.

Léonie.

--
@LeonieWatson tink.uk Carpe diem