-
Notifications
You must be signed in to change notification settings - Fork 445
Open
Description
Background
The Keyboard Interaction section of the Spin Button Pattern specifies functionality for the 'Home' and 'End' keys that conflict with the guidance to support standard single-line editing keys.
Guidance for 'Home' and 'End' is:
- Home: If the spinbutton has a minimum value, sets the value to its minimum.
- End: If the spinbutton has a maximum value, sets the value to its maximum.
With respect to editing, the guidance includes:
- If the spinbutton text field allows directly editing the value, the following keys are supported:
- Standard single line text editing keys appropriate for the device platform (see note below).
- Printable Characters: Type characters in the textbox.
Note 2 defines single-line editing key support:
Standard single line text editing keys appropriate for the device platform:
- include keys for input, cursor movement, selection, and text manipulation.
- Standard key assignments for editing functions depend on the device operating system.
- The most robust approach for providing text editing functions is to rely on browsers, which supply them for HTML inputs with type text and for elements with the contenteditable HTML attribute.
- IMPORTANT: Be sure that JavaScript does not interfere with browser-provided text editing functions by capturing key events for the keys used to perform them.
The problem
'Home' and 'End are intended to move the cursor to the beginning and end of the input. Screen readers expect that behavior because the type is an editable input. So, co-opting 'Home' and ''End' for min and max value input is counter to note 2.4 and interferes with single-line text editing.
Metadata
Metadata
Assignees
Labels
No labels