[wp-trac] [WordPress Trac] #40610: HTML5 Validation error in Screen Options > Pagination

WordPress Trac noreply at wordpress.org
Sun Apr 30 15:16:32 UTC 2017


#40610: HTML5 Validation error in Screen Options > Pagination
---------------------------------------+------------------
 Reporter:  Arena94                    |       Owner:
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:  4.8
Component:  Administration             |     Version:
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch has-screenshots  |     Focuses:
---------------------------------------+------------------
Changes (by afercia):

 * keywords:  has-patch => has-patch has-screenshots
 * version:  trunk =>
 * milestone:  Awaiting Review => 4.8


Comment:

 @Arena94 thanks for your patch.

 Looking back for some history, this input type was changed from `text` to
 `number` in [20168], see #17863. Seems the `maxlength` attribute was kept
 for some backwards compatibility concerns. However,
 [https://make.wordpress.org/core/2017/04/23/target-browser-coverage/ the
 next 4.8 release is going to drop support for old IEs] so maybe worth
 considering to remove it.

 Worth noting seems browsers have all sorts of different behaviours, most
 of them allow to enter more than 3 characters ignoring the `max="999"` and
 `maxlength="3"` attributes when manually entering numbers, regardless of
 the presence of the attribute (it only works when the input type is
 `text`).

 As far as I see, removing `maxlength="3"` makes some difference just in
 IE11 and Edge. With `maxlength="3"` it's not possible to manually enter
 more than 3 numbers. Without `maxlength="3"` it becomes possible. It is
 always possible when the entered value starts with an alpha character.

 Chrome Mac (doesn't honor max and maxlength when manually entering
 numbers)
 [[Image(https://cldup.com/eUK-6h-Q93.png)]]

 Firefox Mac (doesn't prevent alpha characters input, doesn't honor max and
 maxlength when manually entering numbers)
 [[Image(https://cldup.com/QQHEBwpDyL.png)]]

 IE11 (doesn't prevent alpha characters input, doesn't honor max and
 maxlength when entering a mix of alpha characters and numbers)
 [[Image(https://cldup.com/c59l4SjesH.png)]]

 Edge (same as IE11 plus doesn't honor max when incrementing the field
 value using the up arrow)
 [[Image(https://cldup.com/gVgUtQ2qHU.png)]]

 Moving to 4.8 consideration.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40610#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list