liveBook · Manning

Inputmode attribute

As explained in Architecting Accessibility

The HTML inputmode global attribute hints which virtual keyboard is appropriate for entering text.

Choosing the right virtual keyboard can make form entry less tiring. The inputmode attribute hints which kind of data a person will enter, so the browser can offer a better-suited keyboard. section 6.1.3

Useful values include:

  • email, which typically provides an @ key and may include a .com key. section 6.1.3
  • numeric, which requests a keyboard optimized for number entry. section 6.1.3
  • Other values: none, text, decimal, tel, search, and url. section 6.1.3

A numeric keyboard for age

Use inputmode="numeric" on an age field to request a numeric keyboard on touch devices. section 6.1.10

How Architecting Accessibility covers it

How deep it goes
Explains the attribute as a keyboard hint, describes email and numeric layouts, and lists supported values.
Examples
Uses an email keyboard with an @ key and a numeric keyboard for a dog-age field.
What you can do after
Apply it via HTML input fields to request email- or number-optimized keyboards during touch-device data entry.
How it connects
Links inputmode to HTML input types and browser-provided form controls for efficient data entry.

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.