[whatwg] input type=barcode?
mikko.rantalainen at peda.net
Fri Sep 7 03:21:42 PDT 2012
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)
- "speech" or "voice" (prefer voice input)
- "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.
More information about the whatwg