E-mail List Archives
Re: Inputs that are Numbers only like Phone zipcode
From: Jukka K. Korpela
Date: Aug 14, 2014 12:22PM
- Next message: Sailesh Panchang: "Re: Inputs that are Numbers only like Phone zipcode"
- Previous message: Jesse Hausler: "iOS VoiceOver not speaking?"
- Next message in Thread: Sailesh Panchang: "Re: Inputs that are Numbers only like Phone zipcode"
- Previous message in Thread: Nancy Johnson: "Inputs that are Numbers only like Phone zipcode"
- View all messages in this Thread
2014-08-14 20:34, Nancy Johnson wrote:
> 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
I think the important things are:
Does the text before the field (possibly including its label) clearly
state what is expected?
How well does it deal with different types of input? In particular, a
phone input field should accept any spaces and some punctuation and
ignore it, not require it.
How does the page behave when the requirements are not met?
A label should never carry a warning. It should say what is expected,
not what errors may have occurred.
For a phone number, I would primarily use <input type=tel ...> and
possibly use JavaScript checks to check the number.
For a zip code, I would use <input pattern="...">, possibly using
JavaScript to check the input on old browsers.
Yucca
- Next message: Sailesh Panchang: "Re: Inputs that are Numbers only like Phone zipcode"
- Previous message: Jesse Hausler: "iOS VoiceOver not speaking?"
- Next message in Thread: Sailesh Panchang: "Re: Inputs that are Numbers only like Phone zipcode"
- Previous message in Thread: Nancy Johnson: "Inputs that are Numbers only like Phone zipcode"
- View all messages in this Thread