WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Anti-spam email links in Javascript

for

From: Jukka K. Korpela
Date: Apr 8, 2004 11:37AM


On Thu, 8 Apr 2004, Mike Brockington wrote:

> I have been asked to produce a public-facing page containing email
> links.

Fine.

> The user wants to avoid spam, but also wants to have AAA
> accessibility, which appears to be mutually exclusive.

There's no way to avoid spam except staying out of the Internet.

You get spam no matter what you do, sooner or later. Some day this might
be fixed by effective legal actions, but now it's a fact of life.
Just don't make life any harder for that reason to people who already have
their own difficulties.

That is, deal with spam with whatever means you choose, typically spam
filters. Don't make your spam problem your visitors' problem.

> I can't see how to get around the problem that a browser which does not
> have Javascript enabled will not be able to display the email address.

That's _part_ of the problem _you_ would cause.

> Is it acceptable to use a <no-script> tag to say something like:
> "email address obscured due to spam" ?

I lack words to describe how foolish that would be. In any case, it surely
would not comply with accessibility guidelines.

> This would seem to me to go against the general principle of providing
> alternate versions of non-accessible content.

The first principle is to make content accessible - please remember that.
In this case, you would _deliberately_ make accessible content (an E-mail
address) inaccessible.

> The only other option that I have been able to think of is to have the
> <noscript> section provide a link to a form-mail page. Do you think that
> this counts as 'equivalent' to a mailto: link?

It's not a matter of subjective evaluations. It simply isn't. It could be
an improvement to have a form as an _alternative_, but _replacing_ an
email address with a form would reduce accessibility, no matter how good
the form is (most forms on the Web are awful, with their stamp-side
textareas and with their reset buttons). Think about a user who knows how
to use an E-mail program but cannot use a form interface, since only his
E-mail program contains the assistive technology he needs.

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


----
To subscribe, unsubscribe, suspend, or view list archives,
visit http://www.webaim.org/discussion/