diff --git a/spec/aria-reflection.html b/spec/aria-reflection.html new file mode 100644 index 0000000..e830cfd --- /dev/null +++ b/spec/aria-reflection.html @@ -0,0 +1,759 @@ + + + + + + AOM Phase 1 - ARIA reflection + + + + + + +
+

+ This specification describes the additions to existing specifications which will make it possible for web authors to programmatically + express Element semantics in two ways: +

+

+
+
+

IDL Interface

+

This section is part of the + ARIA 1.2 Specification, and is included here for informative purposes only.

+ +

Conforming user agents MUST implement the following IDL interfaces.

+
+

Interface Mixin + AccessibilityRole +

+
+    interface mixin AccessibilityRole {
+    attribute DOMString? role;
+    };
+    Element includes AccessibilityRole;
+          ShadowRoot includes AccessibilityRole;
+  
+
+

ARIA Role Reflection

+

User agents MUST + reflect the + + role + content attribute as the + role IDL attribute on + Element instances.

+
+
+
+

Interface Mixin + AriaAttributes +

+
+    interface mixin AriaAttributes {
+    attribute DOMString? ariaActiveDescendant;
+    attribute DOMString? ariaAtomic;
+    attribute DOMString? ariaAutoComplete;
+    attribute DOMString? ariaBusy;
+    attribute DOMString? ariaChecked;
+    attribute DOMString? ariaColCount;
+    attribute DOMString? ariaColIndex;
+    attribute DOMString? ariaColSpan;
+    attribute DOMString? ariaControls;
+    attribute DOMString? ariaCurrent;
+    attribute DOMString? ariaDescribedBy;
+    attribute DOMString? ariaDetails;
+    attribute DOMString? ariaDisabled;
+    attribute DOMString? ariaErrorMessage;
+    attribute DOMString? ariaExpanded;
+    attribute DOMString? ariaFlowTo;
+    attribute DOMString? ariaHasPopup;
+    attribute DOMString? ariaHidden;
+    attribute DOMString? ariaInvalid;
+    attribute DOMString? ariaKeyShortcuts;
+    attribute DOMString? ariaLabel;
+    attribute DOMString? ariaLabelledBy;
+    attribute DOMString? ariaLevel;
+    attribute DOMString? ariaLive;
+    attribute DOMString? ariaModal;
+    attribute DOMString? ariaMultiLine;
+    attribute DOMString? ariaMultiSelectable;
+    attribute DOMString? ariaOrientation;
+    attribute DOMString? ariaOwns;
+    attribute DOMString? ariaPlaceholder;
+    attribute DOMString? ariaPosInSet;
+    attribute DOMString? ariaPressed;
+    attribute DOMString? ariaReadOnly;
+    attribute DOMString? ariaRelevant;
+    attribute DOMString? ariaRequired;
+    attribute DOMString? ariaRoleDescription;
+    attribute DOMString? ariaRowCount;
+    attribute DOMString? ariaRowIndex;
+    attribute DOMString? ariaRowSpan;
+    attribute DOMString? ariaSelected;
+    attribute DOMString? ariaSetSize;
+    attribute DOMString? ariaSort;
+    attribute DOMString? ariaValueMax;
+    attribute DOMString? ariaValueMin;
+    attribute DOMString? ariaValueNow;
+    attribute DOMString? ariaValueText;
+    };
+    Element includes AriaAttributes;
+          ShadowRoot includes AriaAttributes;
+  
+
+

ARIA Attribute Reflection

+

User agents MUST + reflect the following content attributes to each of the corresponding IDL attributes on + Element instances.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDL AttributeReflected ARIA Content Attribute
+ ariaActiveDescendant + + aria-activedescendant +
+ ariaAtomic + + aria-atomic +
+ ariaAutoComplete + + aria-autocomplete +
+ ariaBusy + + aria-busy +
+ ariaChecked + + aria-checked +
+ ariaColCount + + aria-colcount +
+ ariaColIndex + + aria-colindex +
+ ariaColSpan + + aria-colspan +
+ ariaControls + + aria-controls +
+ ariaCurrent + + aria-current +
+ ariaDescribedBy + + aria-describedby +
+ ariaDetails + + aria-details +
+ ariaDisabled + + aria-disabled +
+ ariaErrorMessage + + aria-errormessage +
+ ariaExpanded + + aria-expanded +
+ ariaFlowTo + + aria-flowto +
+ ariaHasPopup + + aria-haspopup +
+ ariaHidden + + aria-hidden +
+ ariaInvalid + + aria-invalid +
+ ariaKeyShortcuts + + aria-keyshortcuts +
+ ariaLabel + + aria-label +
+ ariaLabelledBy + + aria-labelledby +
+ ariaLevel + + aria-level +
+ ariaLive + + aria-live +
+ ariaModal + + aria-modal +
+ ariaMultiLine + + aria-multiline +
+ ariaMultiSelectable + + aria-multiselectable +
+ ariaOrientation + + aria-orientation +
+ ariaOwns + + aria-owns +
+ ariaPlaceholder + + aria-placeholder +
+ ariaPosInSet + + aria-posinset +
+ ariaPressed + + aria-pressed +
+ ariaReadOnly + + aria-readonly +
+ ariaRelevant + + aria-relevant +
+ ariaRequired + + aria-required +
+ ariaRoleDescription + + aria-roledescription +
+ ariaRowCount + + aria-rowcount +
+ ariaRowIndex + + aria-rowindex +
+ ariaRowSpan + + aria-rowspan +
+ ariaSelected + + aria-selected +
+ ariaSetSize + + aria-setsize +
+ ariaSort + + aria-sort +
+ ariaValueMax + + aria-valuemax +
+ ariaValueMin + + aria-valuemin +
+ ariaValueNow + + aria-valuenow +
+ ariaValueText + + aria-valuetext +
+

Note: Attributes + aria-dropeffect and + aria-grabbed were deprecated in ARIA 1.1 and do not have corresponding IDL attributes.

+
+
+

Disambiguation Pattern

+

Though specification authors may make exceptions to this pattern, the following rules were used to disambiguate names + and case of the IDL attributes listed above.

+
    +
  • Any attribute name referencing concepts that are combinations of two or more words (such as "described by") becomes + a camel-cased IDL attribute capitalizing each word boundary. For example, + aria-describedby becomes + ariaDescribedBy with both the D and B capitalized.
  • +
  • Likewise, any attribute name referencing concepts that can be hyphenated (such as "multi-selectable") becomes a camel-cased + IDL attribute capitalizing each hyphenation boundary. For example, the only valid spelling for "multi-selectable" is + hyphenated, so + aria-multiselectable becomes + ariaMultiSelectable with both the M and S capitalized.
  • +
  • When trusted dictionary sources list both hyphenated or non-hyphenated spellings (e.g. "multi-line" and "multiline" + are both valid spellings) use the hyphenated version and apply the hyphenation rule above. For example, + aria-multiline becomes + ariaMultiLine with both the M and L capitalized.
  • +
  • If all trusted dictionary sources list a single spelling of a compound word with no spaces or hyphens, only the first + letter of the term is capitalized. For example, neither “place-holder” nor “place holder” are considered valid spellings + of the term “placeholder,” so + aria-placeholder becomes + ariaPlaceholder with only the P capitalized.
  • +
  • There are currently no acronym-based ARIA attributes, but if future attributes include acronym usage, attempt to match + existing DOM conventions (e.g. ID becomes Id).
  • +
+
+
+

IDL Attribute Name Notes or Exceptions

+

Any notes or exceptions for specific attribute names will be listed here.

+
    +
  • + ariaPosInSet: The + aria-posinset attribute refers to an item's position in a set (two words: "in set") rather than the "inset" + of an item from the beginning of the collection. Therefore the IDL attribute name is + ariaPosInSet with the P, I, and second S capitalized, + not + ariaPosInset.
  • +
+

Editor's Note: Should we make an exception on the spelling of "placeholder" and capitalize the H anyway? Some developers + will expect this to be + ariaPlaceHolder despite the fact that it's not a hyphenated word.

+
+
+ +
+

Example IDL Attribute Usage

+

The primary purpose of ARIA IDL attribute reflection is to ease JavaScript-based manipulation of values. The following + examples demonstrate its usage.

+ +
+ +
+

Interaction between + ShadowRoot and + host +

+

If an + Element has an attached + ShadowRoot, and the author has access to the + ShadowRoot, authors may set a + role or ARIA attribute, such as + + ariaActivedescendant + , on + either the + Element, + or the + ShadowRoot, or both. +

+

+ If an IDL property from either the + AccessibilityRole mixin or the + AriaAttributes mixin + is set on either the Element + or its associated ShadowRoot, + that IDL attribute should be + mapped + to the + accessible object + associated + with the host + Element. +

+

+ If a property is set to a non-null value on + both the + ShadowRoot + and the host + Element, the reflected value on the host + Element takes precedence, + i.e. the reflected role value on the host Element + is used to compute the + mapped role + in the + accessibility tree, + regardless of the value of the role value on the associated + ShadowRoot, + and similarly for all ARIA attribute properties. +

+ +
+
+ + + diff --git a/spec/computed-accessibility-tree.html b/spec/computed-accessibility-tree.html new file mode 100644 index 0000000..8ebfb50 --- /dev/null +++ b/spec/computed-accessibility-tree.html @@ -0,0 +1,133 @@ + + + + + Accessibility Object Model, Phase 4 + + + + + + +
+

+ This document is a placeholder for + the spec for "Accessibility Tree Introspection", + a part of the AOM project. + For background, please refer to the + Accessibility Object Model Explainer. +

+
+
+

+ Phase 4: Computed Accessibility Tree +

+

+ The Computed Accessibility Tree API will allow authors to + access the full computed accessibility tree - all computed + properties for the accessibility node associated with each + DOM node, plus the ability to walk the computed tree + structure including virtual nodes. +

+

+ This will make it possible to: +

+ +

+ One implication of implementing this phase is that all browsers must agree on + exposing the *same* accessibility tree for the same given webpage, otherwise + differences will invariably lead to authored pages that work in some browsers + but not others. Care must be taken to define this phase in such a way that + maintains a high degree of compatibility between browsers, without exposing any + internal details and nuances. +

+
+ + diff --git a/spec/index.html b/spec/index.html index 01a4fcc..4be1b28 100644 --- a/spec/index.html +++ b/spec/index.html @@ -2,7 +2,7 @@ - Accessibility Object Model, Phase 1 + Accessibility Object Model + + + + +
+

+ This spec has been deprecated, + please see the + Accessibility Object Model Explainer + and + index to specs + for up to date information. +

+

+ This specification provides a way for authors to make web apps + accessible using scripting, rather than the only option being + declarative accessibility features of HTML markup. In the + first phase, the author is able to programmatically + modify the accessible representation of an existing DOM + element. In future phases, the author is able to respond to + additional input events from assistive technology, + create new virtual accessible objects on the page that don't + correspond to an HTML element at all, and explore the computed + accessibility tree. +

+
+
+

Introduction

+
+

Explainer

+

+ Please refer to the + + Accessibility Object Model Explainer for the background and + motivation. +

+

If you have questions, comments, or other feedback, please + file an issue on GitHub. +

+
+
+

Document Scope

+

The Accessibility Object Model spec is narrowly focused on the goal of creating a scripting API for web accessibility. It's intended to complement existing web accessibility APIs such as [[!WAI-ARIA]], not replace them. In particular, this spec attempts to avoid proposing new roles, states, and properties an of accessible objects except where necessary.

+
+
+

Criteria for Inclusion

+

This specification is not intended to solve all accessibility problems on the Web. It is currently impossible to make some web features accessible, so the primary goal is to resolve immediate needs quickly for existing, inaccessible web interfaces. The specification editors are purposefully deferring many useful ideas in order to maintain a realistic timeline for highest priority features.

+

+ We have defined Inclusion/Exclusion Criteria + in order to clarify exactly what will be considered in-scope. +

+
+
+
+

+ Phase 1: Accessible Properties +

+
+

+ Extensions to the Element interface +

+

+ The author can request an accessible node from any valid [[!DOM]] + Element. +

+
+          partial interface Element {
+            readonly attribute AccessibleNode accessibleNode;
+          };
+        
+

+ The accessibleNode attribute returns the accessible + node associated with this DOM element. It always returns + a valid object if the browser supports the AOM. +

+
+
+

+ AccessibleNode interface +

+
+        interface AccessibleNode {
+          attribute DOMString? role;
+          attribute DOMString? roleDescription;
+
+          // Accessible label and description.
+          attribute DOMString? label;
+          attribute AccessibleNodeList? labeledBy;
+          attribute AccessibleNodeList? describedBy;
+
+          // Global states and properties.
+          attribute DOMString? current;
+
+          // Widget properties.
+          attribute DOMString? autocomplete;
+          attribute boolean? hidden;
+          attribute DOMString? keyShortcuts;
+          attribute boolean? modal;
+          attribute boolean? multiline;
+          attribute boolean? multiselectable;
+          attribute DOMString? orientation;
+          attribute boolean? readOnly;
+          attribute boolean? required;
+          attribute boolean? selected;
+          attribute DOMString? sort;
+
+          // Widget states.
+          attribute DOMString? checked;
+          attribute boolean? expanded;
+          attribute boolean? disabled;
+          attribute DOMString? invalid;
+          attribute DOMString? hasPopUp;
+          attribute DOMString? pressed;
+
+          // Control values.
+          attribute DOMString? valueText;
+          attribute DOMString? placeholder;
+          attribute double? valueNow;
+          attribute double? valueMin;
+          attribute double? valueMax;
+
+          // Live regions.
+          attribute boolean? atomic;
+          attribute boolean? busy;
+          attribute DOMString? live;
+          attribute DOMString? relevant;
+
+          // Other relationships.
+          attribute AccessibleNode? activeDescendant;
+          attribute AccessibleNodeList? controls;
+          attribute AccessibleNode? details;
+          attribute AccessibleNode? errorMessage;
+          attribute AccessibleNodeList? flowTo;
+          attribute AccessibleNodeList? owns;
+
+          // Collections.
+          attribute long? colCount;
+          attribute unsigned long? colIndex;
+          attribute unsigned long? colSpan;
+          attribute unsigned long? posInSet;
+          attribute long? rowCount;
+          attribute unsigned long? rowIndex;
+          attribute unsigned long? rowSpan;
+          attribute long? setSize;
+          attribute unsigned long? level;
+        };
+        
+

+ Initially all AccessibleNode properties must return null. +

+

+ All AccessibleNode properties, on setting, store the provided value. + On getting, they return the user-provided value if present and valid, + and null otherwise. The validity of a property valid is specified in + greater detail below. +

+

+ Values set on a DOM element's AccessibleNode are used + for the browser's implementation of native accessibility APIs for + that accessibility property. + When both an AccessibleNode property and its equivalent ARIA attribute + are both present, the ARIA attribute overrides the AccessibleNode + property. +

+

+ If a property of AccessibleNode is set to an invalid value, it is ignored. +

+
+
+

+ AccessibleNodeList interface +

+

+ An AccessibleNodeList represents an ordered + list of AccessibleNodes. + It's used to represent relationships between one + AccessibleNode and other + AccessibleNodes in the accessibility tree. + Unlike AccessibleNode, AccessibleNodeList + has a constructor. +

+
+        [
+          Constructor(optional sequence<AccessibleNode> nodes = [])
+        ]
+        interface AccessibleNodeList {
+          attribute unsigned long length;
+          getter AccessibleNode? item(unsigned long index);
+          setter void (unsigned long index, AccessibleNode node);
+          void add(AccessibleNode node, optional AccessibleNode? before = null);
+          void remove(long index);
+        };
+        
+
+
+

+ Mapping to ARIA attributes +

+

+ In Phase 1, there's a 1:1 correspondence between the set of + properties on AccessibleNode and the list of valid ARIA + attributes from the [[!WAI-ARIA]] 1.1 spec. + This table shows the mappings and also includes deprecated + ARIA attributes that are not mapped into AccessibleNode + properties. +

+

+ The Accessibility Object Model does not define new semantics. + The semantic meaning of each AccessibleNode property + is identical to the meaning of the ARIA attribute. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Accessibility property table +
Attribute nameTypeEquivalent ARIA attribute
activeDescendantAccessibleNode?aria-activedescendant
atomicboolean?aria-atomic
autocompleteDOMString?aria-autocomplete
busyboolean?aria-busy
checkedDOMString?aria-checked
colCountlong?aria-colcount
colIndexunsigned long?aria-colindex
colSpanunsigned long?aria-colSpan
controlsAccessibleNodeList?aria-controls
currentDOMString?aria-current
describedByAccessibleNodeList?aria-describedby
detailsAccessibleNode?aria-details
disabledboolean?aria-disabled
aria-dropeffect + (deprecated) +
errorMessageAccessibleNode?aria-errormessage
expandedboolean?aria-expanded
flowToAccessibleNodeList?aria-flowto
aria-grabbed + (deprecated) +
hasPopUpDOMString?aria-haspopup
hiddenboolean?aria-hidden
invalidDOMString?aria-invalid
keyShortcutsDOMString?aria-keyshortcuts
labelDOMString?aria-label
labeledByAccessibleNodeList?aria-labeledby,
aria-labelledby
levelunsigned long?aria-level
liveDOMString?aria-live
modalboolean?aria-modal
multilineboolean?aria-multiline
multiselectableboolean?aria-multiselectable
orientationDOMString?aria-orientation
ownsAccessibleNodeList?aria-owns
placeholderDOMString?aria-placeholder
posInSetunsigned long?aria-posinset
pressedDOMString?aria-pressed
readOnlyboolean?aria-readonly
relevantDOMString?aria-relevant
requiredboolean?aria-required
roleDescriptionDOMString?aria-roledescription
rowCountlong?aria-rowcount
rowIndexunsigned long?aria-rowindex
rowSpanunsigned long?aria-rowspan
selectedboolean?aria-selected
setSizelong?aria-setsize
sortDOMString?aria-sort
valueMaxdouble?aria-valuemax
valueMindouble?aria-valuemin
valueNowdouble?aria-valuenow
valueTextDOMString?aria-valuetext
+
+
+

+ Types +

+

+ While ARIA attributes are all strings, AccessibleNode properties + can have many different types. Most of these are straightforward, + for example valueNow, valueMin, and + valueMax are of type double, while + rowCount is of type long. +

+

+ The primary difference is with ARIA attributes that take one + or more IDREFs. In AccessibleNode, they take references to + one or more AccessibleNodes directly. This makes it possible + to establish relationships between nodes that aren't in the + same tree scope, such as in different frames (with the + same origin), or in the shadow DOM of a custom element. +

+

+ In particular, + activeDescendant, + details, and + errorMessage + are set with another AccessibleNode, while + controls, + flowTo, + labeledBy, + describedBy, and + owns + all take an AccessibleNodeList. +

+
+
+

+ Validation +

+

+ Upon setting a property of AccessibleNode, no validation is + done. The user-provided value is simply stored, converted to the + appropriate type via the standard rules for JavaScript types. + This is to + ensure that backwards compatibility is maintained; when a new + property is added or a new value is recognized as valid, authors + do not have to worry that browsers who have not yet added support + will break or throw an exception upon encountering this code. +

+
+
+
+

+ Phase 2: Accessible Actions +

+

See Phase 2

+
+
+

+ Phase 3: Virtual Accessibility Nodes +

+

See Phase 3

+
+
+

+ Phase 4: Computed Accessibility Tree +

+

See Phase 4

+
+
+

+ Acknowledgements +

+

+ Many thanks for valuable feedback, advice, and tools from: + Alex Russell, Bogdan Brinza, Chris Fleizach, Cynthia Shelley, David Bolter, Domenic Denicola, Ian Hickson, Joanmarie Diggs, Marcos Caceres, Nan Wang, Robin Berjon, and Tess O'Connor. +

+

+ Bogdan Brinza and Cynthia Shelley of Microsoft contributed to the first draft of this spec but are no longer actively participating. +

+
+ + diff --git a/spec/phase2.html b/spec/phase2.html index 14b1b9b..dcc8271 100644 --- a/spec/phase2.html +++ b/spec/phase2.html @@ -90,6 +90,16 @@ +
+

+ This spec has been deprecated, + please see the + Accessibility Object Model Explainer + and + index to specs + for up to date information. +

+

Introduction

diff --git a/spec/phase3.html b/spec/phase3.html index 01d9fcf..841c3ae 100644 --- a/spec/phase3.html +++ b/spec/phase3.html @@ -89,6 +89,16 @@ }; +

+

+ This spec has been deprecated, + please see the + Accessibility Object Model Explainer + and + index to specs + for up to date information. +

+

Introduction

diff --git a/spec/phase4.html b/spec/phase4.html index d1da25e..a5df408 100644 --- a/spec/phase4.html +++ b/spec/phase4.html @@ -90,6 +90,16 @@ +
+

+ This spec has been deprecated, + please see the + Accessibility Object Model Explainer + and + index to specs + for up to date information. +

+

Introduction

diff --git a/spec/user-action-events.html b/spec/user-action-events.html new file mode 100644 index 0000000..bbe8122 --- /dev/null +++ b/spec/user-action-events.html @@ -0,0 +1,105 @@ + + + + + + Accessibility Object Model, Phase 2 + + + + + + + +

+

+ This document is a placeholder for + the spec for "User Action Events", + a part of the AOM project. + For background, please refer to the + Accessibility Object Model Explainer. +

+
+ + + diff --git a/spec/virtual-accessibility-nodes.html b/spec/virtual-accessibility-nodes.html new file mode 100644 index 0000000..e6a4594 --- /dev/null +++ b/spec/virtual-accessibility-nodes.html @@ -0,0 +1,143 @@ + + + + + + Accessibility Object Model, Phase 3 + + + + + + + +
+

+ This document is a placeholder for the spec for "Virtual Accessibility Nodes", a part of the AOM project. For background, please refer to the + Accessibility Object Model Explainer for the background and motivation. +

+
+
+

+ Virtual Accessibility Nodes +

+

+ Virtual Accessibility Nodes will allow authors to expose "virtual" accessibility nodes, which are not associated directly + with any particular DOM node, to assistive technology. +

+

+ This mechanism is often present in native accessibility APIs, in order to allow authors more granular control over the accessibility + of custom-drawn APIs. +

+

+ On the web, this would allow: +

    +
  • creating an accessible alternative to canvas-based UI which does not rely on fallback or visually-hidden DOM content.
  • +
  • adding semantic information to other types of non-DOM based UI, such as a remote desktop implementation using a + <video> element, or another novel form of UI presentation.
  • +
+

+
+
+ + + +