Accessibility/WebAccessibilityAPI: Difference between revisions

Jump to navigation Jump to search
Line 705: Line 705:
<pre>
<pre>
function matcher(elm) { }
function matcher(elm) { }
var pos1 = new AccessiblePos(new DOMPoint(x, y), a11edoc).move("forward", matcher);
var pos1 = new A11ePos(new DOMPoint(x, y), a11edoc).move("forward", matcher);


var pos2 = new AccessiblePos(elm, "at").move("backward", matcher);
var pos2 = new A11ePos(elm, "at").move("backward", matcher);


var pos3 = new AccessiblePos(pos).move("forward", matcher);
var pos3 = new A11ePos(pos).move("forward", matcher);
or
or
var pos2 = pos2.search("forward", matcher);
var pos2 = pos2.search("forward", matcher);
Line 719: Line 719:


<pre>
<pre>
callback Matcher = sequence<SearchTerm> or SearchTerm (AccessibleElement);
callback Matcher = SearchTerm sequence<SearchTerm> (AccessibleElement);
</pre>
</pre>


Line 799: Line 799:




Examples:
<b>Examples.</b>


<pre>
<pre>
Line 818: Line 818:




<b> Example. Navigate by widgets and structures, and by words in case of text.</b>
<pre>
<pre>
function matcher(aElm)
function matcher(aElm)
Line 835: Line 836:
}
}


// Navigates by widgets and structures, and by words in case of text.
pos.move("next", finder);
pos.move("next", finder);
</pre>
</pre>


====Other methods====
====Other methods====
Confirmed users
1,396

edits

Navigation menu