Customized text entries
<input type="tel"> and
<input type="url"> can be used to optimize the ways user enter these often-difficult to type data, e.g. through dedicated virtual keyboards, or by accessing on-device records for these data (from the address book, bookmarks, etc.).
Date and time entries can take advantage of a number of dedicated form controls (e.g.
<input type="date">) to trigger the use of a native calendar control, avoiding the need to create custom JS-based controls that cannot be easily tailored to cope for the variety of mobile devices available on the market. Beware though: specific browsers may only support a subset of these controls, falling back to regular text entries when the input type value is not supported.
placeholder attribute allows to guide user input by inserting hints that describe the type of content expected in a text-entry control.
<datalist> element allows creating free-text input controls coming with pre-defined values the user can select from; the
autocomplete attribute is a mechanism to automatically fill input fields based on well-known data for the user, solving the problem of working with long and multi-page forms that are common on mobile devices, e.g. in mobile purchase scenarios.
Technologies in progress
Copy and paste operations are a core mechanism to pass text input from one application to another, especially on devices where text input remains a challenge. The Clipboard API and events specification describe APIs for overriding the default clipboard actions (e.g. to add metadata or to reformat the content), and for directly accessing the clipboard contents (e.g. to keep clipboard data in sync between a local app that communicates with a remote device).
|Feature||Specification / Group||Maturity||Current implementations|
|Clipboard||Clipboard API and events|
Web Applications Working Group
- Input modality
inputmodeattribute defined the type of textual input expected in a text entry. Mobile browsers could use that hint to render the right type of on-screen keyboard, for instance to display a keypad when the user was expected to enter a credit card number. This attribute is no longer supported in recent browsers and has been removed from HTML. Developers are encouraged to use more specific input types (such as