How do I use an HTML5 element for my field widget? I have found lots of resources about using HTML5 elements in custom forms (via Form API or using elements module). What's the standard technique which implements HTML5 field widgets (e.g. for a node field)?

For example, I have an "integer" field on node type "article" for which i want to use an HTML5 "number" input type. The only widget available to Fields API for data type number_integer is "textfield".
Your question is not clear please explain what HTML5 element you want to add to the form field. If you want to add placeholder or any other element you can pass them in #attributes, like this:


$form['name'] = array(
  '#type' => 'textfield',
  '#title' => t('First Name'),
  '#attributes' => array('placeholder' => 'First Name'),
);