See http://mobileinputtypes.com/ for an overview of mobile keyboards. This seems to be an underspecified area of HTML where all options are imperfect one way or another:
- type=number shows an overcomplicated keyboard with mostly not numbers, shows a spinner (there are various browser-specific hacks to hide it, but they look fragile), and allegedly rejects some natural input (such as six digits with space in the middle) on Firefox
- type=tel shows the right keyboard but is a poor fit semantically
- type=text with pattern=\d* or something similar shows the right keyboard but is not an ideal fit semantically and rejects anything that's not exactly six digits on Firefox
- inputmode is not recognized by anything currently out there, and does not offer more useful options than type, anyway.
Tests:
- type=number with min/max 0/999999
- type=number with pattern [0-9]{6} and min/max
- type=tel
- type=tel with pattern [0-9]{6}
- type=text with pattern [0-9]{6}
- type=text with pattern [0-9]* (recommended by the Apple developer docs)
(Also type="tel" is currently unstyled in vform at least.)