palantir / blueprint

A React-based UI toolkit for the web
https://blueprintjs.com/
Apache License 2.0
20.51k stars 2.15k forks source link

Consider using [0-9] pattern for TimePicker component #6852

Open evansjohnson opened 1 week ago

evansjohnson commented 1 week ago

Splitting out from https://github.com/palantir/blueprint/issues/3434#issuecomment-2174949583

The keyboard for a TimePicker component was updated to a full numeric keyboard in https://github.com/palantir/blueprint/pull/6568 by adding a type="number" prop to the input element.

From a linked GOV.UK article in the original issue there was a suggestion to use type="text" inputmode="numeric" pattern="[0-9]*". While the accessibility concerns reported there for type="number" seem to no longer apply, the TimePicker component may still benefit from the [0-9]* pattern since other characters should not be relevant.