Pages

Thursday 23 August 2012

Implement Form API support for new HTML5 elements


Overview

HTML5 forms are one of the areas where major changes and improvements have been made. There are 13 new element types and a number of new attributes that aim to improve both the user and developer experience of HTML forms. As part of the Drupal 8 HTML 5 Initiative, one of our goals is to add support for all of these elements and attributes. For detailed browser support information and demonstrations, visit http://wufoo.com/html5/.

Proposed plan

  1. Create an issue for the implementation of each element.
  2. Implement the elements in core, starting with the basic ones first.
  3. Look for legitimate uses for the elements in core and implement them.
  4. When issue is fixed, add issue to the HTML5 FAPI change set.

Point Person(s)

Related Issues/Discussions

HTML5 Field Widgets

NameIssue(s)
color#1740438: Add a new color field type
email#1668332: Move E-mail field type into core
number#1519852: Use the new number FAPI element for the number field textfield widget
range
tel#1740470: Add a new phone number field type
url#501434: Move Link/URL field type into core

HTML5 Input Types

NameSpecificationIssue(s)
colorWHATWG | W3C#1445224: Add new HTML5 FAPI element: color
#1675000: Allow selecting an alpha channel for the color FAPI element
#1651344: Use color input type in the color.module
dateWHATWG | W3C#1496632: Add new HTML5 FAPI Element : date
datetimeWHATWG | W3C#1496644: Add new HTML5 FAPI Element : datetime
datetime-localWHATWG | W3C#1496652: Add new HTML5 FAPI Element : datetime-local
monthWHATWG | W3C#1496682: Add new HTML5 FAPI Element : month
weekWHATWG | W3C#1496686: Add new HTML5 FAPI Element : week
timeWHATWG | W3C#1496708: Add new HTML5 FAPI Element : time
emailWHATWG | W3C#1174620: Add new HTML5 FAPI element: email
numberWHATWG | W3C#1174640: Add new HTML5 FAPI element: number
#1519720: Remove element_validate_integer() and element_validate_integer_positive() replace with number element type
#1527988: Missing or legacy number validation
#1540174: Some attributes not allowed for the new HTML5 input elements
rangeWHATWG | W3C#1174646: Add new HTML5 FAPI element: range
#1540174: Some attributes not allowed for the new HTML5 input elements
#1539820: Browser stylesheet of some webkit based browsers hides range element
searchWHATWG | W3C#1174628: Add new HTML5 FAPI element: search
telWHATWG | W3C#1174634: Add new HTML5 FAPI element: telephone
urlWHATWG | W3C#1174630: Add new HTML5 FAPI element: url
NOTE: Here's a simple module JR wrote to test the new input types.http://drupal.org/node/1496644

HTML5 Input Attributes

NameSpecificationIssue(s)
acceptWHATWG | W3C
autocompleteWHATWG | W3C#1275764: Allow FAPI usage of the autocomplete attribute
autofocusWHATWG | W3C#1174936: Allow FAPI usage of the autofocus attribute
dirnameWHATWG | W3C
list (datalist)WHATWG | W3C
formactionWHATWG | W3C
formenctypeWHATWG | W3C
formmethodWHATWG | W3C
formnovalidateWHATWG | W3C
formtargetWHATWG | W3C
maxWHATWG | W3C
minWHATWG | W3C
multipleWHATWG | W3C#625958: Support Uploading Multiple Files for HTML5 Browsers via #multiple attribute
novalidateWHATWG | W3C
patternWHATWG | W3C#1174766: Support the #pattern FAPI property for native HTML5 pattern attribute
placeholderWHATWG | W3C#1174694: Allow FAPI usage of the placeholder attribute
#1241938: Add support for #placeholder to relevant Field API widgets
requiredWHATWG | W3C#1174938: Natively support the HTML5 #required FAPI property
spellcheckWHATWG | W3C
stepWHATWG | W3C#1174640: Add new HTML5 FAPI element: number

New HTML5 Form Elements

NameSpecificationIssues(s)
keygenWHATWG | W3C
meterWHATWG | W3C
outputWHATWG | W3C
progressWHATWG | W3C#1477550: Bring progressbar to the postmodern era

No comments:

Post a Comment