Accessibility/WebAccessibilityAPI: Difference between revisions

Jump to navigation Jump to search
Line 29: Line 29:
   readonly attribute AttributeSet attributes;
   readonly attribute AttributeSet attributes;
   sequence<AccessibleElement>? relationsOf(DOMString type);
   sequence<AccessibleElement>? relationsOf(DOMString type);
   readonly attribute Object patternOf(DOMString type);
   readonly attribute Object patternOf(DOMString type);??


   readonly attribute ValueSet actions;
   readonly attribute ActionSet actions;
   void activate(DOMString action);
   void activate(DOMString action);
   readonly attribute Interactions intreactions;
   readonly attribute InteractionSet intreactions;


   readonly attribute AccesibleElement? parent;
   readonly attribute AccesibleElement? parent;
Line 125: Line 125:
</div>
</div>


<code>AttributeSet</code> is generic interface aimed to work with {name, value} pairs, i.e. regardless its name it is map like object. It may contain names of with no value, i.e. name is either presented or not. In this case when the map is described by javascript Object then the object property is expected to have <code>true</code> value. For example, <code>{ checkable: true }</code>.
<code>AttributeSet</code> is an interface aimed to work with {name, value} pairs, i.e. regardless its name it is map like object. It may contain names of with no value, i.e. name is either presented or not. In this case when the map is described by javascript Object then the object property is expected to have <code>true</code> value. For example, <code>{ checkable: true }</code>.


<pre>
<pre>
Line 143: Line 143:
::Return true if all properties of the given object and their values match name/value pairs from the map. If matched property value is null then value is ignored and is not part of the match.
::Return true if all properties of the given object and their values match name/value pairs from the map. If matched property value is null then value is ignored and is not part of the match.
</code>
</code>


====Attribute list====
====Attribute list====
Line 198: Line 197:


===Patterns===
===Patterns===
 
???
<code>
<code>
Object .''patternOf''(DOMString type)
Object .''patternOf''(DOMString type)
Line 245: Line 244:
</code>
</code>


=====ScrollDelta=====


<pre>
<pre>
Line 269: Line 269:
:::''page'' - ''x'' specifies how many pages to scroll
:::''page'' - ''x'' specifies how many pages to scroll
</code>
</code>
<div id="ActionSet">
====ActionSet====
</div>
Accessible actions are presented by <code>ActionSet</code> object.
<pre>
interface ActionSet {
  readonly setlike<Action>;
};
</pre>
Each action is presented by <code>Action</code> object.
<pre>
interface Action {
  stingifier readonly attribute name;
  readonly attribute description;
  readonly InteractionSet interactions(optional DOMString device);
};
</pre>
<code>
Action .''name''
::Action name
Action .''description''
::Localized action description
Action .''interactions''
::Set of interactions to invoke the action
:::Parameters
::::device (optional)
:::::device name like 'keyboard' or 'touchscreen' the interactions should be returned for
</code>
Here's a script announcing available actions on the accessible element.
<pre>
var set = accElm.actions;
if (set.size() == 0) {
  say("no actions on accessible element");
} else {
  say("accessible element has " + set.size() + " actions");
  set.forEach(action => say(action.description));
}
</pre>


====Interactions====
====Interactions====
Line 310: Line 359:
readonly attribute sequence<Action> actions;
readonly attribute sequence<Action> actions;
readonly attribute ValueSet interactions;
readonly attribute ValueSet interactions;
<pre>
interface Action {
  stingifier readonly attribute name;
  readonly attribute description;
  readonly sequence<Interaction> interactions(optional DOMString device);
};
</pre>


<pre>
<pre>
Line 332: Line 373:
* invoke action
* invoke action
* AT and interaction conflicts???
* AT and interaction conflicts???


===Parent-child relations===
===Parent-child relations===
Confirmed users
1,396

edits

Navigation menu