Confirmed users
1,396
edits
| Line 2,131: | Line 2,131: | ||
===Taxonomy types=== | ===Taxonomy types=== | ||
</div> | </div> | ||
Each taxonomy is described means of its own interface which is used to define the hierarchy and interconnections between taxonomies. If taxon refers to taxa of other taxonomy type then a string describing the reference may be in form of "taxon:modifier", where taxon is a name of related taxon and modifier is an extra information about how the taxa are interconnected. For example, role taxon may be connected to "live" taxon of attributes taxonomy by placing "live:assertive" value in <code>attributes</code> field which means that the role supports "live" object attribute and its default value is "assertive" on it. | |||
====Roles==== | ====Roles==== | ||
<pre> | <pre> | ||
dictionary | dictionary RoleTaxon { | ||
DOMString landmark; | DOMString landmark; | ||
DOMString description; | DOMString description; | ||
sequence<DOMString> parents; | |||
sequence<DOMString> owns; | |||
sequence<DOMString> states; | |||
Object attributes; | Object attributes; | ||
}; | }; | ||
| Line 2,148: | Line 2,150: | ||
<code> | <code> | ||
RoleTaxon .''landmark'' | |||
::Navigation landmark name if applicable. | ::Navigation landmark name if applicable. | ||
RoleTaxon .''description'' | |||
::Localized role description. | ::Localized role description. | ||
RoleTaxon .''parents'' | |||
::List of roles the role is inherited from. | ::List of roles the role is inherited from. | ||
RoleTaxon .''owns'' | |||
::List of roles allowed in children of the role. Used for validation. | ::List of roles allowed in children of the role. Used for validation. | ||
RoleTaxon .''states'' | |||
::List of states allowed on the role. | ::List of states allowed on the role. Optional modifier is "default" which points out that the state is exposed on the role until explicitly specified otherwise. See [[#Implied_semantics|implied semantics]]. | ||
RoleTaxon .''attributes'' | |||
::List of attributes | ::List of attributes supported by the role. Default value of the attribute may be specified as modifier. For example, "live:polite" points out that "live" object attribute has "polite" value by default. If default value is not specified then it's taken from referred attribute taxon description. | ||
</code> | </code> | ||
<b>Example. ARIA <code>textbox</code> role</b> | |||
<pre> | |||
var taxa = { | |||
widget: { } | |||
input: { | |||
parents: [ "widget" ], | |||
states: [ "focusable:default", "focused" ] | |||
}, | |||
textbox: { | |||
description: "text field", | |||
parents: [ "input" ], | |||
states: [ | |||
"singleline:default", "multiline", | |||
"editable", "readonly", | |||
"required" | |||
], | |||
attributes: [ "autocomplete" ] | |||
} | |||
}; | |||
</pre> | |||
<b>Example. ARIA <code>log</code> role.</b> | |||
<pre> | |||
var taxa = { | |||
region: { | |||
}, | |||
log: { | |||
parents: [ "region" ], | |||
attributes: [ "live:polite" ] | |||
} | |||
}; | |||
</pre> | |||
====States==== | ====States==== | ||
<pre> | <pre> | ||
dictionary | dictionary StateTaxon { | ||
DOMString description; | |||
sequence<DOMString> dependents; | |||
DOMString opposite; | |||
} | } | ||
</pre> | |||
<code> | |||
StateTaxon .''description'' | |||
::Localized taxa description. | |||
StateTaxon .''dependents'' | |||
::List of all dependent states. For example, "focused" state always accompanied by "focusable" state. | |||
StateTaxon ..''opposite'' | |||
::An opposite state if any. Opposite state are mutually exclusive. For example, if "vertical" state is applied then "horizontal" is not and vice versa. | |||
</code> | |||
<b>Example.</b> | |||
<pre> | |||
var taxa = { | |||
focusable: { | |||
dependents: [ "focused" ] | |||
}, | |||
focused: { }, | |||
singleline: { | |||
opposite: "multiline" | |||
}, | |||
multiline: { | |||
opposite: "singleline" | |||
}, | |||
readonly: { }, | |||
editable: { }, | |||
required: { } | |||
}; | |||
</pre> | |||
====Attributes==== | |||
<pre> | |||
interface AttributeTaxon { | |||
DOMString description; | |||
sequence<DOMString> values; | |||
DOMString default; | |||
}; | |||
</pre> | |||
<code> | |||
AttributeTaxon .''description'' | |||
::Localized description of the taxon | |||
AttributeTaxon .''values'' | |||
::List of all possible values of the attrbiute | |||
AttributeTaxon .''default'' | |||
::Default attribute value. Takes a place if role taxa pointing to it doesn't have own default value of it. | |||
</code> | |||
<b>Example</b> | |||
<pre> | |||
var taxa = { | |||
autocomplete: { | |||
values: [ "none", "list", "inline", "both" ], | |||
default: "none" | |||
}, | |||
live: { | |||
values: [ "none", "polite", "assertive" ], | |||
default: "none" | |||
} | |||
}; | |||
</pre> | </pre> | ||