[whatwg] input type=barcode?

Mounir Lamouri mounir at lamouri.fr
Thu Aug 30 11:59:28 PDT 2012

On 08/30/2012 12:12 PM, Tab Atkins Jr. wrote:
> It shouldn't be a new input type, because it's not a *type* of value.
> Barcodes are simple a wrapper for a value, to make it more easily
> machine-readable.  Scanning a barcode is an input mode for a value,
> just like typing or speaking it is.

Indeed. But then I wonder why it should be an inputmode because there is
no reason why you couldn't use a barcode in any field. inputmode being
an hint for the UA about the input that should be used, which means the
UA would be asked to use a barcode app for certain fields and not
others. I don't really see a use case for that.

However, I think some users might want to use barcodes in some
situations (without any opt-in from the webpage). Like to put an URL or
an email address in a field. But in that case, it seems more like simple
<input type={url,email}>'s. I wonder if we couldn't leave this as UA
implementation details for URL and email fields?


More information about the whatwg mailing list