[whatwg] input type=barcode?

Odin Hørthe Omdal odinho at opera.com
Fri Aug 31 05:19:55 PDT 2012

On Fri, 31 Aug 2012 12:26:23 +0200, Alexandre Morgaut  
<Alexandre.Morgaut at 4d.com> wrote:

> Working in Web applications solutions, I would really love such input  
> type or mode

Thing is, we don't need this on the web platform until some user agent  
actually supports giving input by a "reader" (don't even have to restrict  
it to barcode, it can be whatever).

To the website it will in fact just look like a very fast user typed in  
the data (or pasted it in). So this is possible to do already.

<input type=barcode> makes very little sense imho, because what you want  
to input is always a number or some text. *How* you input that data  
shouldn't be any of the web site's business.

If I want to type in the number on the barcode manually instead of  
scanning it, I should be allowed to do that. If the royal mail service in  
Norway haven't set inputmode to barcode/reader on their <input type=text>  
box for inputting tracking code, the user agent is still *totally* able  
(and allowed) to push in data from a barcode reader there still.

Quite frankly, there is no need to spec stuff like this now, as long as  
it's not being used at this time. Why hint about something that doesn't  
exist in user agents?

Right now we don't have _any_ inputmode hints at all. It's still possible  
to provide inputs to <input> fields from voice-to-text, from keyboard,  
 from touchscreens with on-screen keyboards, pre-filling etc.

Basically, there is no need to say anything about a barcode reader, if you  
have one in your user agent, just use it... It will work already.

Odin Hørthe Omdal (Velmont/odinho) · Core, Opera Software, http://opera.com

More information about the whatwg mailing list