# AOM Input Event Types

## Unofficial Proposal Draft, 1 January 1970

This version:
  https://wicg.github.io/aom/spec/input-events.html
Latest published version:
  https://wicg.github.io/aom/spec/input-events.html
Editors:
  Alice Boxhall (Google)
  Gary Kacmarcik (Google)

Copyright © 1970 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark and permissive document license rules apply.

## Abstract

This specification defines additional `inputType` values for the `beforeinput` and `input` events that are required for the Accessibility Object Model [AOM]. This specification builds on the UI events spec [UI-EVENTS].

## Status of this document

Changes to this document may be tracked at https://github.com/wicg/aom.

## 1. Introduction

This section is non-normative.

Input events will be triggered by certain user interactions, in certain contexts, as well as via assistive technology interactions.

## 2. Use Cases

This section is non-normative.

### 2.1. Implementing an ARIA slider

TODO: Use case

## 3. Input Events

The [UIEVENTS] specification defines the `InputEvent` type which is used by the `beforeinput` and `input` events.

### 3.1. Input event interfaces

The `InputEvent` interface extends the `Event` interface.

    partial interface InputEvent : UIEvent {
      readonly attribute DOMString? inputType;
    };

inputType

  A `DataTransfer` object to hold data and meta data related to the event.

Note: The IDL for `inputType` should be moved into [UIEVENTS] so that it can be shared between this spec and the Input Events Level 2 spec.

### 3.2. Input Event Types

#### 3.2.1. actionIncrement

An `InputEvent` event with `inputType` set to actionIncrement fires in response to an input action that increments a control. For example, as a result of a ArrowRight or ArrowUp key press.

This event type is valid for the following roles:

- "progressbar"

- "scrollbar"

- "slider"

- "spinbutton"

#### 3.2.2. actionDecrement

An `InputEvent` event with `inputType` set to actionDecrement fires in response to an input action that increments a control. For example, as a result of a ArrowLeft or ArrowDown key press.

This event type is valid for the following roles:

- "progressbar"

- "scrollbar"

- "slider"

- "spinbutton"

#### 3.2.3. actionDismiss

An `InputEvent` event with `inputType` set to actionDismiss fires when a dialog or other dismissable ACTION element is closed.

This event type is valid for the following roles:

- "menu"

- "dialog"

- "alertdialog"

#### 3.2.4. actionScrollPageUp

An `InputEvent` event with `inputType` set to actionScrollPageUp fires when user requests the current content to scroll up (or right) by a "page", where a page of data is typically equal to one screen.

This type differs from actionIncrement in that it applies only to scrollable content.

This event type is intended for scrollable content, but is valid for all roles (since it can bubble up to the `body` element, which is scrollable).

#### 3.2.5. actionScrollPageDown

An `InputEvent` event with `inputType` set to actionScrollPageDown fires when user requests the current content to scroll down (or left) by a "page", where a page of data is typically equal to one screen.

This type differs from actionDecrement in that it applies only to scrollable content.

This event type is intended for scrollable content, but is valid for all roles (since it can bubble up to the `body` element, which is scrollable).

## 4. Security Considerations

Not applicable. This specification simply adds new possible values for an existing `InputEvent` attribute.

## 5. Privacy Considerations

Not applicable. This specification defines new `inputType` values that will be sent for all users, not just those with accessibility features enabled.

## 6. Acknowledgements

This section is non-normative

We would like to acknowledge the contributions made by the following:

Dominic Mazzoni, Ian Pouncey,

James Craig, James Teh, Jeffrey Yasskin, and Léonie Watson.

## Conformance

### Document conventions

Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification.

All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. [RFC2119]

Examples in this specification are introduced with the words “for example” or are set apart from the normative text with `class="example"`, like this:

This is an example of an informative example.

Informative notes begin with the word “Note” and are set apart from the normative text with `class="note"`, like this:

Note, this is an informative note.

### Conformant Algorithms

Requirements phrased in the imperative as part of algorithms (such as "strip any leading space characters" or "return false and abort these steps") are to be interpreted with the meaning of the key word ("must", "should", "may", etc) used in introducing the algorithm.

Conformance requirements phrased as algorithms or specific steps can be implemented in any manner, so long as the end result is equivalent. In particular, the algorithms defined in this specification are intended to be easy to understand and are not intended to be performant. Implementers are encouraged to optimize.

.

## Index

### Terms defined by this specification

- actionDecrement, in §3.2.2
- actionDismiss, in §3.2.3
- actionIncrement, in §3.2.1
- actionScrollPageDown, in §3.2.5
- actionScrollPageUp, in §3.2.4
- Input Event Types, in §3.2
- inputType
  - attribute for InputEvent, in §3.1
  - dfn for InputEvent, in §3.1

https://dom.spec.whatwg.org/#event Referenced in:

- 3.1. Input event interfaces

https://html.spec.whatwg.org/multipage/dnd.html#datatransfer Referenced in:

- 3.1. Input event interfaces

https://www.w3.org/TR/uievents/#inputevent Referenced in:

- 3. Input Events
- 3.1. Input event interfaces (2)
- 3.2.1. actionIncrement
- 3.2.2. actionDecrement
- 3.2.3. actionDismiss
- 3.2.4. actionScrollPageUp
- 3.2.5. actionScrollPageDown
- 4. Security Considerations

https://www.w3.org/TR/uievents/#uievent Referenced in:

- 3.1. Input event interfaces

http://www.w3.org/TR/uievents/#event-type-beforeinput Referenced in:

- Unnumbered Section
- 3. Input Events

http://www.w3.org/TR/uievents/#event-type-input Referenced in:

- Unnumbered Section
- 3. Input Events

http://www.w3.org/TR/uievents-code/#code-arrowdown Referenced in:

- 3.2.2. actionDecrement

http://www.w3.org/TR/uievents-code/#code-arrowleft Referenced in:

- 3.2.2. actionDecrement

http://www.w3.org/TR/uievents-code/#code-arrowright Referenced in:

- 3.2.1. actionIncrement

http://www.w3.org/TR/uievents-code/#code-arrowup Referenced in:

- 3.2.1. actionIncrement

https://heycam.github.io/webidl/#idl-DOMString Referenced in:

- 3.1. Input event interfaces

### Terms defined by reference

- [DOM] defines the following terms:
  - Event
- [HTML] defines the following terms:
  - DataTransfer
- [UIEVENTS] defines the following terms:
  - InputEvent
  - UIEvent
  - beforeinput
  - input
- [uievents-code] defines the following terms:
  - arrowdown
  - arrowleft
  - arrowright
  - arrowup
- [WebIDL] defines the following terms:
  - DOMString

## References

### Normative References

[AOM]
  A. Boxhall; et al. Accessibility Object Model. URL: https://wicg.github.io/aom/spec/
[DOM]
  Anne van Kesteren. DOM Standard. Living Standard. URL: https://dom.spec.whatwg.org/
[HTML]
  Anne van Kesteren; et al. HTML Standard. Living Standard. URL: https://html.spec.whatwg.org/multipage/
[RFC2119]
  S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://tools.ietf.org/html/rfc2119
[UIEVENTS]
  Gary Kacmarcik; Travis Leithead; Doug Schepers. UI Events. 30 May 2019. WD. URL: https://www.w3.org/TR/uievents/
[UIEVENTS-CODE]
  Gary Kacmarcik; Travis Leithead. UI Events KeyboardEvent code Values. 1 June 2017. CR. URL: https://www.w3.org/TR/uievents-code/
[WebIDL]
  Boris Zbarsky. Web IDL. 15 December 2016. ED. URL: https://heycam.github.io/webidl/

## IDL Index

    partial interface InputEvent : UIEvent {
      readonly attribute DOMString? inputType;
    };

#dom-inputevent-inputtype Referenced in:

- 3.1. Input event interfaces
- 3.2.1. actionIncrement
- 3.2.2. actionDecrement
- 3.2.3. actionDismiss
- 3.2.4. actionScrollPageUp
- 3.2.5. actionScrollPageDown
- 5. Privacy Considerations

#actionincrement Referenced in:

- 3.2.1. actionIncrement
- 3.2.4. actionScrollPageUp

#actiondecrement Referenced in:

- 3.2.2. actionDecrement
- 3.2.5. actionScrollPageDown

#actiondismiss Referenced in:

- 3.2.3. actionDismiss

#actionscrollpageup Referenced in:

- 3.2.4. actionScrollPageUp

#actionscrollpagedown Referenced in:

- 3.2.5. actionScrollPageDown