WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: A question about credit card numbers

for

From: Jukka K. Korpela
Date: Sep 23, 2004 1:13AM


On Thu, 23 Sep 2004, blackdorrit wrote:

> There are two main ways of entering credit card numbers on a Web page
> - accepting all 16 (or 15 in some cases) in one string, or having
> four boxes each accepting four digits (except perhaps the last one
> ...)

Entering credit card numbers is an example of a situation where
accessibility might be _undesirable_. We don't want to let small kids
enter their parent's credit card number, and even many adults should be
_prevented_ from using their credit card on the Web too easily. But this
means that entering a credit card number need not, and maybe _should not_,
be easy to people who are mentally or cognitively significantly below
the level of an average adult. Such people, if they have a credit card,
should really use it only as assisted by someone they can trust.

But in other respects, such as regards to visual impairment and motoric
disabilities, normal accessibility considerations apply. This means, in my
opinion, that you should use a single text input field with size="19" and
preceded by a statement that asks the user to input the credit card number
as printed on the card, using spaces if desired. Naturally the server-side
processing should take care of removing spaces. The point is that is by
far easiest to type the number as printed, grouped into four digit groups,
but users should be allowed to omit the spaces too.

> I prefer the four box option with the auto-tabbing, but it may be
> that users with a disability or with older browsers or browsers with
> no javascript enabled, may be disadvantaged.

That's one problem - they need to tab, or even click on the next field if
they don't know tabbing. (We often consider the problems of people who
cannot use a mouse; but here we should _also_ think about the majority (?)
who hasn't learned to tab fluently.) The second problem is that
auto-tabbing may surprise and distract the user. Moreover, dividing
something that is logically, functionally, and intuitively a single
identifying string is not natural and might even confuse the user.

I would apply the same principle to the expiration date: make it a single
text field, and ask the user to type it as printed on the card.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/