[whatwg] Spellchecking mark III
pkasting at google.com
Wed Jan 21 09:50:18 PST 2009
On Wed, Jan 21, 2009 at 1: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?
As others have noted, the user's preferences are generally a better
indicator of how something should be spellchecked, for a number of reasons.
(Bill Corry's email was on-point here.)
> 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.
As I said, this seems a separate problem to me. Dynamic language switching
or multi-language spellchecking based on various heuristics seems like the
solution here. This applies to any spellchecked field anywhere and is
separate from the issue of whether an author wants to tell the UA that a
field is even appropriate for spellchecking or not.
My second sentence was trying to argument that page author has no
> business forcing the spellchecking on if the page author cannot force
> the spellchecking language!
I disagree completely. Consider one of the original use cases for this:
Gmail instructing UAs to spellcheck the optional "Subject" field of a mail.
There's no way Gmail can know what language(s) the user may type in this
field, but it's still appropriate to tell the UA that the field is
appropriate for spellchecking. At this point it's up to the AU to determine
what language to use.
I also take issue with the word "force", which is imprecise. The spellcheck
attribute spec was carefully written to ensure that the user and UA have
ultimate control over whether spellchecking actually occurs, regardless of
what the author specifies; the attribute is a hint to the UA, not "force".
> Forcing a spellchecking on with incorrect language would harm the user!
A good reason why the UA's spellchecking language should not be determined
by the author (and thus why your proposal leaves me cold).
> the other hand, if the content language is explicitly defined, then the
> user agent has the required knowledge to decide if the spellchecking
> should be enabled or disabled. There's no need for the "spellcheck"
The UA does not know which fields actually contain "language" and which
simply contain strings of characters. Enumerating input types (e.g. "this
field contains email addresses") can address this, but suffers from two
* There are an unbounded number of input types, potentially
* Types should perhaps not always be treated equally. For example, if an
author wrote a spelling quiz, then input boxes for a user to type in would
contain words and thus be of a spellcheckable type, but the author would
clearly prefer the UA not spellcheck them :)
If we can persuade content authors to specify the correct content
Proposals that sound like "if we could just get authors to write valid,
semantic content with no errors..." have always seemed naive to me.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg