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 @@ + + + + +
++ This specification describes the additions to existing specifications which will make it possible for web authors to programmatically + express Element semantics in two ways: +
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 { + attribute DOMString? role; + }; + Element includes AccessibilityRole; + ShadowRoot includes AccessibilityRole; ++
User agents MUST
+ reflect the
+
+ role
+
content attribute as the
+ role
IDL attribute on
+ Element
instances.
+ 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; ++
User agents MUST
+ reflect the following content attributes to each of the corresponding IDL attributes on
+ Element
instances.
IDL Attribute | +Reflected ARIA Content Attribute | +
---|---|
+ ariaActiveDescendant + | +
+ |
+
+ ariaAtomic + | +
+ |
+
+ ariaAutoComplete + | +
+ |
+
+ ariaBusy + | +
+ |
+
+ ariaChecked + | +
+ |
+
+ ariaColCount + | +
+ |
+
+ ariaColIndex + | +
+ |
+
+ ariaColSpan + | +
+ |
+
+ ariaControls + | +
+ |
+
+ ariaCurrent + | +
+ |
+
+ ariaDescribedBy + | +
+ |
+
+ ariaDetails + | +
+ |
+
+ ariaDisabled + | +
+ |
+
+ ariaErrorMessage + | +
+ |
+
+ ariaExpanded + | +
+ |
+
+ ariaFlowTo + | +
+ |
+
+ ariaHasPopup + | +
+ |
+
+ ariaHidden + | +
+ |
+
+ ariaInvalid + | +
+ |
+
+ ariaKeyShortcuts + | +
+ |
+
+ ariaLabel + | +
+ |
+
+ ariaLabelledBy + | +
+ |
+
+ ariaLevel + | +
+ |
+
+ ariaLive + | +
+ |
+
+ ariaModal + | +
+ |
+
+ ariaMultiLine + | +
+ |
+
+ ariaMultiSelectable + | +
+ |
+
+ ariaOrientation + | +
+ |
+
+ ariaOwns + | +
+ |
+
+ ariaPlaceholder + | +
+ |
+
+ ariaPosInSet + | +
+ |
+
+ ariaPressed + | +
+ |
+
+ ariaReadOnly + | +
+ |
+
+ ariaRelevant + | +
+ |
+
+ ariaRequired + | +
+ |
+
+ ariaRoleDescription + | +
+ |
+
+ ariaRowCount + | +
+ |
+
+ ariaRowIndex + | +
+ |
+
+ ariaRowSpan + | +
+ |
+
+ ariaSelected + | +
+ |
+
+ ariaSetSize + | +
+ |
+
+ ariaSort + | +
+ |
+
+ ariaValueMax + | +
+ |
+
+ ariaValueMin + | +
+ |
+
+ ariaValueNow + | +
+ |
+
+ ariaValueText + | +
+ |
+
Note: Attributes
+
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.
+ariaDescribedBy
with both the D and B capitalized.ariaMultiSelectable
with both the M and S capitalized.ariaMultiLine
with both the M and L capitalized.ariaPlaceholder
with only the P capitalized.Any notes or exceptions for specific attribute names will be listed here.
+ariaPosInSet
: The
+ 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.
The primary purpose of ARIA IDL attribute reflection is to ease JavaScript-based manipulation of values. The following + examples demonstrate its usage.
+ +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.
+
+ 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. +
++ 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. +
++ 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. +
++ 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. +
+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.
+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. +
+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); + }; ++
+ 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. +
+Attribute name | +Type | +Equivalent ARIA attribute | +
---|---|---|
activeDescendant |
+ AccessibleNode? |
+ aria-activedescendant |
+
atomic |
+ boolean? |
+ aria-atomic |
+
autocomplete |
+ DOMString? |
+
|
+
busy |
+ boolean? |
+ aria-busy |
+
checked |
+ DOMString? |
+
|
+
colCount |
+ long? |
+
|
+
colIndex |
+ unsigned long? |
+
|
+
colSpan |
+ unsigned long? |
+
|
+
controls |
+ AccessibleNodeList? |
+ aria-controls |
+
current |
+ DOMString? |
+
|
+
describedBy |
+ AccessibleNodeList? |
+ aria-describedby |
+
details |
+ AccessibleNode? |
+ aria-details |
+
disabled |
+ boolean? |
+
|
+
+ | + |
+ (deprecated)
+ |
+
errorMessage |
+ AccessibleNode? |
+ aria-errormessage |
+
expanded |
+ boolean? |
+
|
+
flowTo |
+ AccessibleNodeList? |
+ aria-flowto |
+
+ | + |
+ (deprecated)
+ |
+
hasPopUp |
+ DOMString? |
+
|
+
hidden |
+ boolean? |
+
|
+
invalid |
+ DOMString? |
+
|
+
keyShortcuts |
+ DOMString? |
+
|
+
label |
+ DOMString? |
+
|
+
labeledBy |
+ AccessibleNodeList? |
+ aria-labeledby, |
+
level |
+ unsigned long? |
+
|
+
live |
+ DOMString? |
+
|
+
modal |
+ boolean? |
+
|
+
multiline |
+ boolean? |
+
|
+
multiselectable |
+ boolean? |
+
|
+
orientation |
+ DOMString? |
+
|
+
owns |
+ AccessibleNodeList? |
+ aria-owns |
+
placeholder |
+ DOMString? |
+
|
+
posInSet |
+ unsigned long? |
+
|
+
pressed |
+ DOMString? |
+
|
+ readOnly |
+ boolean? |
+
|
+
+
relevant |
+ DOMString? |
+
|
+
required |
+ boolean? |
+
|
+
roleDescription |
+ DOMString? |
+
|
+
rowCount |
+ long? |
+
|
+
rowIndex |
+ unsigned long? |
+
|
+
rowSpan |
+ unsigned long? |
+
|
+
selected |
+ boolean? |
+
|
+
setSize |
+ long? |
+
|
+
sort |
+ DOMString? |
+
|
+
valueMax |
+ double? |
+
|
+
valueMin |
+ double? |
+
|
+
valueNow |
+ double? |
+
|
+
valueText |
+ DOMString? |
+
|
+
+ 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.
+
+ 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. +
+See Phase 2
+See Phase 3
+See Phase 4
++ 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. +
++ This spec has been deprecated, + please see the + Accessibility Object Model Explainer + and + index to specs + for up to date information. +
+
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.
+
+ This spec has been deprecated, + please see the + Accessibility Object Model Explainer + and + index to specs + for up to date information. +
+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 @@ + + + +
++ 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. +
++ 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 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: +
<video>
element, or another novel form of UI presentation.