[wp-trac] [WordPress Trac] #17863: HTML5 input type=number in admin settings

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 21 18:26:11 UTC 2011


#17863: HTML5 input type=number in admin settings
----------------------------+-----------------------------------
 Reporter:  niallkennedy    |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:
 Severity:  minor           |   Keywords:  has-patch ui-feedback
----------------------------+-----------------------------------
 There has been some discussion and tickets around HTML5 inputs, the proper
 time to introduce changes, and fallback support for browsers not able to
 take full advantage of the changes. I'd like to start with a relatively
 simple change: identifying input fields in settings that expect a number.
 http://www.whatwg.org/specs/web-apps/current-work/multipage/number-
 state.html#number-state
 http://www.miketaylr.com/code/html5-forms-ui-support.html

 I would like to accomplish a few things:

 * Move input validation to the client instead of waiting for an error on
 save. If there is an option to close comments after X days I would like to
 restrict input to characters 0-9; modern browsers can help.
 * Communicate minimum or maximum values on the settings page. If we know
 the backend is going to reject a value over 20 we can restrict the input
 in the browser to try and help the administrator provide better input
 values.
 * Trigger input helpers such as an up-down arrows in browsers with extra
 UI help for numbers. iOS brings up a numeric keypad instead of a keyboard
 for example.
 * Fallback behavior is input type=text, same as now.

 CSS rules for input type="text" would have to change to include input
 type="number" for UI consistency.

 Attached is a patch for wp-admin/options-discussion as an example.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17863>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list