W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2012

Re: [whatwg] input type=barcode?

From: Mikko Rantalainen <mikko.rantalainen@peda.net>
Date: Fri, 07 Sep 2012 13:21:42 +0300
Message-ID: <5049CAB6.8020302@peda.net>
To: whatwg@lists.whatwg.org
2012-09-07 07:35 Europe/Helsinki: Ian Hickson:
> On Thu, 30 Aug 2012, Jonas Sicking wrote:
>> 
>> I think while in theory we could rely on UAs to enable barcode entry 
>> anywhere, which definitely would provide the maximum capabilities for 
> [...]
> 
> In this respect it's similar to the WebKit-proprietary x-webkit-speech 
> attribute on <input>. In fact, this suggests that if other browsers are 
> interested in supporting speech input, maybe we should standardise it as 
> an inputmode value, e.g. inputmode="speech". Possible the inputmode="" 
> attribute in that case could be switched to a list of tokens, so you could 
> in fact do inputmode="latin-prose speech" or inputmode="numeric barcode" 
> in order to provide the user agent with more flexibility in the UI.

While I agree that inputmode attribute should be made a space separated
list of tokens, I'd avoid stuff like "latin-prose". Expected input
language should be specified via lang or xml:lang attributes instead.

Examples of somewhat sensible inputmode values for input type=text:

- "unicode" or "text"
- "numeric" (prefer numeric input but allow any text)
- "barcode"
- "speech" or "voice" (prefer voice input)
- "word"
- "sentence"
- "letters" (e.g. "letters voice" means spell by letter)
- "ascii" (prefer real 7 bit ascii over unicode text)

The inputmode "word" vs "sentence" vs "letters" could be used for e.g.
hinting predictive text input to now suggest/auto-correct words when
single letters (some kind of code) is expected.

However, it's far from clear if this is worth WHATWG specification right
yet. All these features could be nice but unless UA vendors are going to
implement at least some of these, there's no point.

-- 
Mikko
Received on Friday, 7 September 2012 10:22:18 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:45 UTC