diff --git a/third_party/aria-practices/src/content/patterns/spinbutton/examples/quantity-spinbutton.html b/third_party/aria-practices/src/content/patterns/spinbutton/examples/quantity-spinbutton.html index 4a43ef23fef7b..f8a9bb2e8afb0 100644 --- a/third_party/aria-practices/src/content/patterns/spinbutton/examples/quantity-spinbutton.html +++ b/third_party/aria-practices/src/content/patterns/spinbutton/examples/quantity-spinbutton.html @@ -2,49 +2,13 @@ - Quantity Spin Button Example - - - - - - - - - - -
-

Quantity Spin Button Example

- -
-

About This Example

- -

- The following example uses the Spin Button Pattern to implement three quantity inputs. -

-

Similar examples include:

- -
- -
-
-

Example

-
-
@@ -189,270 +153,5 @@
- -
- -
-

Accessibility Features

- -
- -
-

Keyboard Support

-

The spin buttons provide the following keyboard support described in the Spin Button Pattern.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyFunction
Down ArrowDecreases value by 1.
Up ArrowIncreases value by 1.
HomeDecreases to minimum value.
EndIncreases to maximum value.
Standard single line text editing keys -
    -
  • Keys used for cursor movement and text manipulation, such as Delete and Shift + Right Arrow.
  • -
  • An HTML input with type="text" is used for the spin button so the browser will provide platform-specific editing keys.
  • -
-
-
- -
-

Role, Property, State, and Tabindex Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RoleAttributeElementUsage
spinbuttoninput[type="text"]Identifies the input[type="text"] element as a spin button.
aria-valuenow="NUMBER"input[type="text"] -
    -
  • Indicates the current numeric value of the spin button.
  • -
  • Updated by JavaScript as users change the value of the spin button.
  • -
-
aria-valuemin="NUMBER"input[type="text"]Indicates the minimum allowed value for the spin button.
aria-valuemax="NUMBER"input[type="text"]Indicates the maximum allowed value for the spin button.
aria-invalid="true"input[type="text"]Indicates that the current value is invalid.
aria-errormessage="ID_REF"input[type="text"]Identifies the element that provides an error message for the spin button.
title="NAME_STRING"buttonDefines the accessible name for each increment and decrement button (Remove adult, Add adult, Remove kid, Add kid, Remove animal, and Add animal).
- aria-controls="ID_REF" - buttonIdentifies the element whose value will be modified when the button is activated.
tabindex="-1"buttonRemoves the increment and decrement buttons from the page Tab sequence while keeping them focusable so they can be accessed with touch-based and voice-based assistive technologies.
aria-disabled="true"buttonSet when the minimum or maximum value has been reached to inform assistive technologies that the button has been disabled.
aria-hidden="true"spanFor assistive technology users, hides the visible minus and plus characters in the increment and decrement buttons since they are symbolic of the superior button labels provided by the title attribute.
output -
    -
  • An element with an implicit role of status and an implicit aria-live value of polite.
  • -
  • Triggers a screen reader announcement of the output element’s updated content at the next graceful opportunity.
  • -
  • When either the increment or decrement button is pressed, the current value of the spin button is injected into the output element.
  • -
  • Its contents are emptied 2000 milliseconds after injection.
  • -
-
-
- -
-

JavaScript and CSS Source Code

- -
- -
-

HTML Source Code

-

To copy the following HTML code, please open it in CodePen.

- -
- - -
-