W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2011

[whatwg] input type=barcode?

From: Mikko Rantalainen <mikko.rantalainen@peda.net>
Date: Wed, 03 Aug 2011 17:52:03 +0300
Message-ID: <4E396093.6040609@peda.net>
Use case:

A form author expects user to enter some kind of code (e.g. driver id
number, bank transfer code, product serial for warranty etc.) that is
accompanied with a barcode on paper. The end user finds it hard to
manually type the code.

Possible solution:

The form could hint the user agent about this by using type "barcode"
for an input element.

Possible user agent support:

(1) Allow using barcode scanner to enter the code (could already work
with existing user agents in case of a model that emulates a keyboard
because unknown input type is treated like a text input)

(2) Allow using webcam as barcode scanner with the UA handling the
camera operation. This would be safer than allowing the web site to
access the camera by itself to implementing the barcode scanning with
site specific code (because untrusted web site could use the camera for
something else but barcode scanning if access to camera is granted).

(3) Allow using 3rd party software to query barcode code. E.g. Android
phones may have a camera barcode scanner installed which can be used by
other software (e.g. web browser) to acquire the barcode.

Obviously the implementations could support various barcode formats
including currently popular QR-code.

The user agent should submit the text read from the code. (I think that
binary codes should not be allowed, only text that can be expressed in
Unicode.)

The backwards compatibility would be automatically available because
using manually entered text input for the barcode code is okay.

What do you think?

-- 
Mikko
Received on Wednesday, 3 August 2011 07:52:03 UTC

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