Re: [whatwg] Input and spell check/keyboard settings

> On 24 Jun 2015, at 13:07, timeless <timeless@gmail.com> wrote:
> 
> Florian Rivoal wrote:
>> If a text input field has lang=foo, and your system has a (virtual)
> keyboard for language foo, I would expect that keyboard to be the one
> presented to you.
> 
> The principle of least surprise argues against this.
> 
> Most mobile phones support many more languages and keyboard layouts than
> their users know how to use.
> 
> Users typically configure layouts for which they have a use, and they learn
> how to use then and switch between them.

I meant you would only be switched between the ones the user has activated and can manually switch between.

> Desktop operating systems include optional keyboard shortcuts for switching
> languages. Most mobile devices include a globe or the ability to press and
> hold the space bar to switch.
> 
> Some keyboards support multilingual input. Some are even smart enough to
> perform spell checking against multiple languages.
> 
> But if I've only configured Hebrew and English and a web page has an input
> with lang=ru or manages to specify an IME which is totally foreign to me,
> I'm going to panic. (For the prototypical user anyway, I'm odd in that I've
> probably used the input method before.)

In my case, it's French, English, Japanese and Chinese. I wouldn't be too
happy to see a Russian keyboard pop up either. But there is a set of keyboards
I'm happy to use and would prefer to have the most appropriate one shown.

>> Same thing with IMEs (e.g. you have a US keyboard and a Japanese IME
> installed on your desktop computer, when focusing a text input field with
> lang=ja, I would expect the IME to be turned on).
> 
> On multi user desktops, the existence of IME support doesn't indicate that
> all users of the computer are remotely comfortable with each IME.

In theory, you're right, but in practice, IME only tent to be installed/activated
on computers of countries where needing one is normal. There can certainly
be some that don't fix expectations, but that's the exception rather than the norm.

>> Not sure if any spec change is needed for that.
> 
> Keyboard layout and IME should be opaque to browser content, so this sort
> of thing should be something where browser vendors are free to experiment
> and discover that it's just not worth it (because language tagging is wrong
> more often than it's right).

Chicken and egg. Language tagging is often wrong because the consequences of
getting it wrong are limited. The more it is used, the more important it will
be to get right, and so authors would pay more attention.

I don't think that we need to do much more than point out that the UA should
display the most appropriate input system given the information it has about
the content and the user's expectation.

It could be reasonable to spec that if the user explicitely sets the language
of the spell checker, or of the virtual keyboard, or similar, then the UA
should update the lang attribute of the focused element accordingly.

 - Florian

Received on Wednesday, 24 June 2015 12:47:19 UTC