WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: instruction for the input fields

for

From: glen walker
Date: Apr 22, 2023 1:47AM


3.3.2 says labels OR instructions. That is, one or the other is required.
Both is common but not necessary to pass. The first line of the
understanding doc says "The intent of this Success Criterion is to have
content authors present instructions or labels that identify the controls
in a form so that users know what input data is expected."

Having a label of "email" or "zipcode" or "phone" is common enough that
"users know what input data is expected". While you could give examples of
formats, I don't think it's necessary, at least to pass 3.3.2, although
it's often a good practice to do so.

A date field might need instructions if you're allowing the user to type in
a value. Ideally, you let them type in a date in any format they want and
you, being a smart programmer, figure it out. The locale might come into
play so that if a user types "01-04-2023", that could either be January 4th
or April 1st. But if you are forcing the user to type in the date in a
specific way, then instructions would be needed.

And for error suggestions, as the SC says, if "suggestions for correction
are known, then the suggestions are provided to the user". If you try to
parse an email address and it fails, I suppose you could be very specific
and say the "@" sign is missing or the domain name is missing, or you could
do as you suggested and say it should be in the format of <EMAIL REMOVED>
but I probably wouldn't fail it if it only said "provide a valid email
address".

For something like creating a password, if you have restrictions such as
number of letters or special characters, you could be specific and say "not
enough letters" or "missing an uppercase letter", etc.


On Sat, Apr 22, 2023 at 12:29 AM Sumit Patel < <EMAIL REMOVED> >
wrote:

> Hai all,
>
> I was going through 3.3.2 labels or instructions,
> according to g89 - https://www.w3.org/WAI/WCAG21/Techniques/general/G89
> We need to provide instruction about the restriction on the format
> fields. They have given Date field as an example.
> So, I think it is applicable for fields like mail id, mobile number
> and zip code also .
> need to provide instruction like " <EMAIL REMOVED> ", "5-digit zip
> code", "10-digit mobile number" etc.
>
> Similarly, according to 3.3.3 error suggestion, we need to make the
> error messages descriptive in a way which helps user to understand
> what is the valid format.
> For example, instead of saying "provide valid mail id" , "provide
> valid mail id. for example: <EMAIL REMOVED> "
>
> So, is it mandatory to mention the expected format of these fields in
> both these scenarios? first one isbefore making the error and second
> one is in the error message .
>
> Regards,
> Sumit.
> > > > >