ACTION-1674: New error message mechanism proposal

The group has raised an issue that we need a mechanism to define a way to
provide error messages to assistive technologies that:

- Allow for an association between the error message and the element that
the error message applies to
- Provides an importance level

Overloading aria-invalid was discussed in that a custom string could be
provided. The group found did not work as aria-invalid takes tokens and not
strings. Also, some host platforms use an enumeration of these values.

When error messages are created and made visible we have found many use
cases are designed to announce the error when it happens (live regions).
However, there may be exceptions where we don't want them announced.
Another issue that was raised was that it is important that all users be
able to see the error message which would imply a relationship to a
message, like aria-describedby, that would allow an author to reference the
visible relationship. Typically, this would require the AT user to follow
the reference to the error message if needed.

As it turns out aria-live already defines implied importance levels with
what we believe to be sufficient granularity - assertive, polite, and off.
Also many of the use cases where errors messages are made available they
are often live so that the user hears them. So, I propose the following;

We define attribute called aria-errormessage that takes a single ID that
points to the error message. Authors should ensure that the ID points to a
message that has an aria-live property. The default is aria-live="off",
consistent with the aria-live attribute.  When the aria-errormessage is
applied the author MUST also supply the aria-invalid attribute to the
element. It is not an author MUST to have an aria-erromessage when
aria-invalid is provided.

aria-errormessage is a global property.

We should consider allowing aria-errormessage to reference pre-defined live
regions:

   role="status" This would allow for a changing error message.
   role="alert" This will not work because alerts come up and then
   disappear.
   role="log" I suspect you could have error log that changes but I think
   that could make people sick as it scrolls if it kept updating.

Rich


Rich Schwerdtfeger

Received on Thursday, 2 July 2015 20:45:35 UTC