WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Inputs that are Numbers only like Phone zipcode

for

From: Jonathan Avila
Date: Aug 15, 2014 10:21AM


> If the field is restricted to numbers only like a phone or zip code.
From the Accessibility perspective is it better to add a warning in the form of label or client-side validation?

In my opinion this question would fall under SC 3.3.2.
http://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-cues.html

The guidance document states "The intent of this success criterion is to have content authors place instructions or labels that identify the controls in a form so that users know what input data is expected."

So the real question is does the label or instruction communicate that it be numerical input? For something like a date field it may be slightly ambiguous -- but it may be ambiguous for all users regardless of disability. SC 3.3.2 does fall under the Guideline for helping users avoid and correct mistakes-- so perhaps use of error messages assist in meeting the requirement.

This is one of those situations where you could make an argument either way and it creates a slight risk to the organization and potential confusion to the user. It would be good to document the decision and the logic behind meeting the SC.

HTML5 Input types may also potentially assist in this situation although they may not be displayed to all users.

Jonathan

-----Original Message-----
From: <EMAIL REMOVED> [mailto: <EMAIL REMOVED> ] On Behalf Of Nancy Johnson
Sent: Thursday, August 14, 2014 1:35 PM
To: WebAIM Discussion List
Subject: [WebAIM] Inputs that are Numbers only like Phone zipcode

If the field is restricted to numbers only like a phone or zip code.
From the Accessibility perspective is it better to add a warning in the form of label or client-side validation?

Currently the engineers are restricting the field but no warning

Thanks

Nancy