WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: instruction for the input fields

for

From: glen walker
Date: Apr 24, 2023 12:46PM


I can't make a general statement without knowing your specific situation.
I gave several examples in my previous reply.

The normative text of 3.3.2 just says "Labels or instructions are provided
when content requires user input."

If your input field has a label, such as "email" or "phone", then
technically you are conforming to that success criterion.

Is that all you have to do? That depends on your definition of
"accessibility". If you only want to adhere to the minimum baseline of
WCAG, then yes. If you want to consider the user experience, then you might
need "instructions" as well, but it's not necessarily required.

The non-normative "understanding" document for 3.3.2 gives more details
that the purpose of this SC is so that users will understand the format of
the input, but since that document is non-normative, not adhering to it
doesn't mean you fail 3.3.2.

Personally, I don't think email fields need instructions.

If you have a US-based site, then a zipcode probably doesn't need
instructions either, unless it's a zip+4 code, in which case the label
should probably indicate that, or there should be two input fields, one for
the zipcode and one for the +4. But other countries have different
"zipcode" type fields: postcode, postal index number, Postleitzahl, etc. In
the US, a zipcode is a common field and doesn't require instructions. I'm
guessing the same is true for other countries.

A phone could be tricky. Is it only US based? US users will know what a US
phone number looks like. But if any country code can be specified, then
instructions might be needed.

Also mentioned previously, you should let the user type whatever they want
and you should figure it out. For US based number, if I type
"123-456-7890" or "123.456.7890" or "1234567890" or "(123) 456-7890", all
should be allowed. If you want to put the burden on the user to type a
format exactly in a way to make your programming job easier, you can
certainly do that. Technically, you might not need to tell the user what
format the phone number should be in but if they use the wrong format, your
error message would need to tell them the correct format (3.3.3). I think
that's a poor UX but passes WCAG.


On Mon, Apr 24, 2023 at 12:08 PM Sumit Patel < <EMAIL REMOVED> >
wrote:

> so, you say it is not a failure of 3.3.2 if an example format is not
> given for the mail fields like mail id and zip code as the user
> already knows what would be the correct format . It is just a good
> practice
> Same with 3.3.3
>
> But, in case if the user has to enter the country code also along with
> the 10 digit number ,
> The user won't be knowing the same if an instruction is not provided
>
>
>