[whatwg] Spellchecking mark III

Aryeh Gregor Simetrical+w3c at gmail.com
Wed Jan 21 06:51:14 PST 2009

On Wed, Jan 21, 2009 at 4:15 AM, Mikko Rantalainen
<mikko.rantalainen at peda.net> wrote:
> If the browser does not know the language of the content, how on earth
> is it supposed to *correctly* spellcheck it? I'm daily hitting a
> situation where browser is trying to spellcheck content with incorrect
> language. I've toggled such automatic spellchecker off and those will
> stay off until correct language is detected.

In practice, I think the only way to avoid this problem is for
browsers to implement content-sniffing techniques of some kind to
figure out the language, at least per field but ideally on a
word-by-word basis.  If the browser is set to spellcheck in English
but you start putting in lots of non-Latin characters and every word
is therefore misspelled, the browser should be clever enough to try
switching the spellcheck language, or at least disabling spellcheck
for words that can't possibly be from the language it's checking
against.  More refined heuristics could detect even subtle
differences, like between British and American English, and remember
for next time which one the user usually types in.

None of this needs, or even could effectively use, author intervention:

1) The author cannot know what languages users will want to enter in
all cases.  I've sometimes found myself writing posts in Hebrew on
English-only sites, for instance.

2) The author certainly won't be able to determine the dialect or
variant of the language the user will want to use, which is necessary
for spellcheck.

3) Authors should not have to add extra markup if it's not really
necessary, because in practice, most won't.  To be as useful as
possible, spellcheck should Just Work without explicit author

More information about the whatwg mailing list