This repository has been archived by the owner on Jun 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.html
1321 lines (1301 loc) · 43.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>
OBSOLETE - Accessibility API
</title>
<meta charset='utf-8'>
<script src='https://www.w3.org/Tools/respec/respec-w3c-common' async
class='remove'>
</script>
<script class='remove'>
/*Make tidy happy*/
var respecConfig = {
// specification status (e.g. WD, LCWD, WG-NOTE, etc.). If in doubt use ED.
specStatus: "unofficial",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "a11y-api",
// if your specification has a subtitle that goes below the main
// formal title, define it here
// subtitle : "an excellent document",
// if you wish the publication date to be other than the last modification, set this
// publishDate: "2009-08-06",
// if the specification's copyright date is a range of years, specify
// the start date here:
// copyrightStart: "2005"
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
// previousPublishDate: "1977-03-15",
// previousMaturity: "WD",
// if there a publicly available Editor's Draft, this is the link
// edDraftURI: "http://berjon.com/",
// if this is a LCWD, uncomment and set the end of its review period
// lcEnd: "2009-08-05",
// editors, add as many as you like
// only "name" is required
editors: [
{
name: "Alexander Surkov"
, url: "http://mozilla.org/"
, mailto: "[email protected]"
, company: "Mozilla"
, companyURL: "http://mozilla.com/"
},
{
name: "Marcos Caceres"
, url: "http://mozilla.org/"
, mailto: "[email protected]"
, company: "Mozilla"
, companyURL: "http://mozilla.com/"
},
],
// name of the WG
// wg: "None",
// URI of the public WG page
// wgURI: "http://example.org/really-cool-wg",
// name (without the @w3c.org) of the public mailing to which comments are due
// wgPublicList: "spec-writers-anonymous",
// URI of the patent status for this WG, for Rec-track documents
// !!!! IMPORTANT !!!!
// This is important for Rec-track documents, do not copy a patent URI from a random
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood
// Team Contact.
// wgPatentURI: "",
// !!!! IMPORTANT !!!! MAKE THE ABOVE BLINK IN YOUR HEAD
};
</script>
</head>
<body>
<section id='abstract'>
<p class="annoying-warning" title="">
THIS DOCUMENT IS OBSOLETE. Please see <a href="https://github.com/WICG/aom">AOM API</a> instead.
</p>
<p>
There's number of objectives on the web to improve accessibility and
usability support. Web applications want to provide special support for
their users, helping them navigate and perceive the content. The
browser has a number of add-ons serving to improve accessibility
support, for example, the app letting to navigate landmarks on the web
page. These tasks require accessibility API similar to what desktop
assistive technologies have.
</p>
<p>
Web accessibility API also allows for in-browser automated
accessibility testing of web content, i.e. helpful for checking that
HTML and other standards in the browser are accessible to all users.
</p>
<p>
On the other hand there's a growing need for making graphical content
accessible. These are charts, graphs and other various visual forms
that are drawn using HTML canvas or SVG. There's also a tendency to use
HTML canvas element in place of DOM because of performance matter,
here's an example. All markup in the example is defined in JavaScript
and there is a need for a non-DOM accessibility solution to make the
content accessible.
</p>
</section>
<section id='sotd'>
<p class="warning" title="THIS DOCUMENT IS OBSOLETE">
Please see <a href="https://github.com/WICG/aom">AOM API</a> instead.
</p>
<section>
<h3>
Things we want feedback on!
</h3>
<ul>
<li>Should we specify hasAnyOf() and hasAllOf() for Set interface? Or
should we just rely on JS's Array interface to do the same thing?
Pros:... Cons:....
</li>
</ul>
</section>
</section>
<section>
<h2>
Accessibility API
</h2>
<p>
The API provides bunch of interfaces that are used to express the
semantics of web content in a way that assistive technologies (AT)
knows how to deal with. Also it provides the ability to search and
traverse the content and interact with it. It has a way to extend
existing semantics of the markup, and add new semantics for
inaccessible content like drawings made using the <code>canvas</code>
element. Each piece of semantic content has an associated accessible
element the AT operates on.
</p>
<section>
<h3>
Terms
</h3>
<p>
An <dfn>assistive technology</dfn> or <dfn>AT</dfn> is software that
provides an improved user experience for different types of users
including people with disabilities. It can be in the form of a native
application, or web application (e.g., zoom tool), or service (e.g.,
speech-to-text).
</p>
<p>
A <dfn>content entity</dfn> is semantically isolated piece of
content. For example, <a>interactive content</a> in [[!HTML]].
</p>
<p>
An <dfn data-lt="accessible elements">accessible element</dfn> is an
object expressing the semantics of a <a>content entity</a>. Such
objects are represented by the <code>AccessibleElement</code>
interface.
</p>
<p>
A <dfn>role</dfn> of an <a>accessible element</a> identifies the
function of the accessible element to assistive technology (e.g.,
"button", "textbox", etc. See also [[!WAI-ARIA]] roles).
</p>
<p>
A <dfn>name</dfn> of an <a>accessible element</a> is a primary human
readable property of an accessible element. For example, <a>assistive
technology</a> could present the name of the <a>accessible
element</a> to the user.
</p>
<p>
A <dfn>description</dfn> of an <a>accessible element</a> is a
secondary human readable property of an <a>accessible element</a>.
It's used to provide more detailed information than <a>name</a> to
the user about a <a>content entity</a> the <a>accessible element</a>
was created for (e.g., a tool tip).
</p>
<p>
A <dfn>text</dfn> of an <a>accessible element</a> is text associated
with the <a>accessible element</a>.
</p>
<p>
An <a>accessible element</a> has a set of <dfn>states</dfn>, which is
represented by a <code>Set</code>-like object. Conceptually, each one
of these <dfn>states</dfn> is a boolean that represents the state the
content entity is currently in. For example, if a [[!HTML]]
<code>button</code> element is in the focused state (e.g., the user
has focused the button by tabbing to it), then its <a>accessible
element</a> will have "<code>focused</code>" state in its
<a>accessible states</a>.
</p>
<p>
An <dfn>attribute</dfn> of an <a>accessible element</a> is a property
that provides extra information about its <a>content entity</a>. For
example, autocomplete feature on an <code>input</code> element would
map to <code>autocomplete</code> attribute with possible values
<code>inline</code>, <code>list</code>, or <code>both</code>.
</p>
<p>
A <dfn>pattern</dfn> of an <a>accessible element</a> expresses the
associated semantics of the <a>content entity</a> that is not
expressed by means of the <code>AccessibleElement</code> interface.
</p>
<p>
A <a>accessible element</a> can have one or more <dfn>relations</dfn>
to other <a>accessible elements</a>. Each relation has a
<dfn>relation type</dfn> that expresses its semantics. Relations of
an accessible objects are represented by objects that implement the
<code>Set</code> interface.
</p>
<p>
An <dfn>user action</dfn> of an <a>accessible element</a> is an
action supported by the <a>content entity</a>. An user action can be
performed on a content entity by the user or the user agent via
script (e.g., a button click). In the API, user actions are
represented by objects that implement the <code>Set</code> interface.
</p>
<p>
A <dfn>device-dependent interaction</dfn> includes things like
keyboard shortcut or mouse gesture used to invoke the <a>action</a>.
In the API, a device-dependent interaction is represented by the
<a>Interaction</a> interface. All supported <a>device-dependent
interactions</a> on an <a>accessible element</a> are represented by
objects that implement the <code>InteractionMap</code> interface.
</p>
<p>
An <dfn data-lt="accessible trees">accessible tree</dfn> is a tree of
<a>accessible elements</a> associated to each other by a parent-child
relationship.
</p>
<p>
An <dfn>accessible parent</dfn> of the referred <a>accessible
element</a> is its parent in the <a>accessible tree</a>.
</p>
<p>
An <dfn>accessible child</dfn> of the referred <a>accessible
element</a> are its child accessible elements in the <a>accessible
tree</a>. It is represented by the <code>AccessibleChildren</code>
interface.
</p>
<p>
An <dfn>accessible DOM node</dfn> or <dfn>accessible DOM
element</dfn> is a [[!DOM]] <code>Node</code> or <code>Element</code>
that has an associated <a>accessible element</a>.
</p>
<p>
An <dfn>accessible position</dfn> is a point in the content when it's
presented in one-dimensional way, that can be semantically traversed.
For example, paragraph text can be traversed by words, or traversing
the document using HTML's outlining algorithm. User focus can also be
described by an <a>accessible position</a>; for example tabbing from
one HTML input element to another within a form.
</p>
<p>
An <dfn>accessible pin</dfn> is an object representing an
<a>accessible position</a> and implementing
<code>AccessiblePin</code> interface.
</p>
</section>
<section class="informative">
<h3>
Understanding the terms
</h3>
<p>
Each <a>content entity</a> has an associated <a>accessible
element</a>. Each <a>accessible element</a> is described by
accessible properties like <a>role</a>, <a>name</a>, <a>relations</a>
etc.
</p>
<figure>
<img src="images/props.png" alt="accessible properties diagram">
<figcaption>
Accessible properties.
</figcaption>
</figure>
<p>
<a>Accessible elements</a> can be related to each other by number of
different types.
</p>
<figure>
<img src="images/rels.png" alt="accessible relations diagram">
<figcaption>
Relations. A color of arrows connecting accessible element
represent own relation type.
</figcaption>
</figure>
<p>
All <a>accessible elements</a> are organized into <a>accessible
trees</a>. In other words, all <a>accessible elements</a> are
supposed to stay in parent-child relationship. The <a>assistive
technology</a> can traverse the document by traversing its
<a>accessible tree</a>.
</p>
<figure>
<img src="images/tree.png" alt="accessible tree">
<figcaption>
Accessible tree.
</figcaption>
</figure>
<p>
The browser exposes semantics of the content to the <a>assistive
technology</a> like screen readers or screen magnifiers softwares via
platform APIs like ATK, IAccessible2, UIA, NSAccessibility or this
API. The <a>assistive technology</a> communicates back to the content
by the browser via platform APIs.
</p>
<figure>
<img src="images/overview.png" alt="overview diagram">
<figcaption>
Overview of the communication between the content and the
<a>assistive technology</a>.
</figcaption>
</figure>
</section>
</section>
<section>
<h2>
Extensions to the <code>Node</code> interface
</h2>
<p>
Assistive technology, or the developer, can request an <a>accessible
element</a> from a [[!DOM]] <code>Node</code> if the <code>Node</code>
is accessible, i.e. it expresses semantics to the assistive technology.
</p>
<pre class="idl">
partial interface Node {
readonly attribute AccessibleElement? a11ement;
};
</pre>
<section>
<h3>
<code>AccessibleElement</code> attribute
</h3>
<p>
The <code>AccessibleElement</code> attribute return the <a>accessible
element</a> associated with this <code>Node</code> (if any).
Otherwise, it returns <code>null</code>.
</p>
</section>
</section>
<section>
<h2>
AccessibleElement interface
</h2>
<pre class="idl">
interface AccessibleElement {
attribute DOMString role;
attribute DOMString name;
attribute DOMString description;
attribute DOMString text;
readonly attribute AccessibleIterable states;
readonly attribute AccessibleIterable attributes;
readonly attribute AccessibleIterable patterns;
readonly attribute AccessibleIterable relations;
boolean is(DOMString ... something);
any get(DOMString attribute);
boolean has(DOMString attribute);
object to(DOMString pattern);
AccessibleElement? relativeOf(DOMString type);
sequence<AccessibleElement> relativeOfAll(DOMString type);
readonly attribute Actions actions;
void activate(DOMString action);
Interactions interactionsOf(optional DOMString action, optional DOMString device);
readonly attribute AccessibleElement? parent;
readonly attribute AccessibleChildren children;
readonly attribute Node? DOMNode;
attribute AccessibleSource? source;
};
</pre>
<section>
<h3>
<code>role</code> attribute
</h3>
<p>
The <dfn><code>role</code></dfn> attribute represents the accessible
role that is either developer defined or a role as per [[!WAI-ARIA]]
(e.g., "button", "menu", "textfield").
</p>
<div class="note">
For the author convenience the attribute value may be a space
separated list of <a>roles</a>. This is useful when an <a>accessible
element</a> should express semantics of both roles but the taxonomy
misses a separate role for that. For example, a check menu item
<a>accessible element</a> may have <code>menuitem checkbox</code>
role if the role taxonomy doesn't have <code>checkmenuitem</code>
<a>role</a>. In this case <code>is</code> method is supposed to
return true for both <code>checkbox</code> and <code>menuitem</code>
values.
</div>
</section>
<section>
<h3>
<code>name</code> attribute
</h3>
<p>
The <dfn><code>name</code></dfn> attribute represents <a>name</a>.
</p>
<p>
When setting, ...
</p>
</section>
<section>
<h3>
<code>description</code> attribute
</h3>
<p>
The <dfn><code>description</code></dfn> attribute <a>description</a>
</p>
<p>
When setting, ...
</p>
</section>
<section>
<h3>
<code>text</code> attribute
</h3>
<p>
The <dfn><code>text</code></dfn> attribute represents <a>text</a>.
</p>
<p>
When setting, ...
</p>
</section>
<section>
<h3>
<code>states</code> attribute
</h3>
<p>
The <dfn><code>states</code></dfn> attribute represents the
<a>states</a>.
</p>
<p>
Returns an <code>iterable</code> for all states exposed on the
accessible element. The implementation is not required to pre-compute
any of the states.
</p>
</section>
<section>
<h3>
<code>attributes</code> attribute
</h3>
<p>
The <dfn><code>attributes</code></dfn> attribute represents
<a>attributes</a>.
</p>
<p>
The accessible element can support a number of attributes to express
the semantics that cannot be described by base properties of an
accessible element.
</p>
<p>
Returns an <code>iterable</code> for all object attributes exposed on
the accessible element. The implementation is not required to
pre-compute any of the attributes.
</p>
<div class="note">
<p>
Set of exposed attributes depends on semantics of the [[!DOM]]
element. As an example, typical attributes are:
</p>
<dl>
<dt>
DOMString autocomplete:
</dt>
<dd>
Exposed on text fields. Values are list, none, inline, both.
</dd>
<dt>
DOMString live:
</dt>
<dd>
Points that the accessible is live region. Values are assertive
and polite.
</dd>
<dt>
DOMString relevant:
</dt>
<dd>
Lists all notifications that qualifies for live region.
</dd>
</dl>
</div>
</section>
<section>
<h3>
<code>patterns</code> attribute
</h3>
<p>
The <code>patterns</code> attribute represents the <a>patterns</a>.
</p>
<p>
Returns an <code>iterable</code> for all patterns exposed on the
accessible element. The implementation is not required to pre-compute
any of the values.
</p>
<div class="note">
Each markup can come with own set of supported patterns. A single
<a>accessible element</a> may support several <a>patterns</a>. A
typical example of a pattern is <code>table cell</code> pattern which
has extra properties like <code>row index</code> and <code>column
index</code>.
</div>
</section>
<section>
<h3>
<code>relations</code> attribute
</h3>
<p>
The <dfn><code>relations</code></dfn> attribute represents the
<a>relation types</a> on the <a>accessible element</a>.
</p>
<p>
Returns an <code>iterable</code> for all <a>relation types</a> that
the <a>accessible element</a> has. The implementation is not required
to pre-compute any of the relations.
</p>
</section>
<section>
<h3>
<code>is</code> method
</h3>
<p>
Return true if the <a>accessible element</a> complies with the given
values. A <a>state</a>, <a>role</a> or <a>pattern</a> can be used as
a value. In case of <a>states</a> the method returns true if the
<a>accessible element</a> has the given <a>state</a>. In case of
<a>role</a> the method returns true if the <a>accessible element</a>
<a>role</a> belongs to a role taxonomy of the given <a>role</a>
value. In case of <a>pattern</a> value the method returns true if the
<a>accessible element</a> supports the given pattern.
</p>
<div class="note">
The taxonomy provider must make sure that <a>role</a> and
<a>states</a> taxonomies don't overlap in names. If a markup have a
<a>pattern</a> and a <a>role</a> of same name then each <a>accessible
element</a> having the <a>role</a> in its role taxonomy must
implement a <a>pattern</a> of same naming. For example, HTML table
cell has <code>cell</code> <a>role</a> and exposes <code>cell</code>
pattern.
</div>
<p>
In the example <code>is</code> method calls on a HTML button return
true.
</p>
<pre class="example highlight">
let al = document.getElementById("button").a11ement;
console.assert(al.is("widget", "focusable"), "should a focusable widget");
</pre>
</section>
<section>
<h3>
<code>get</code> method
</h3>
<p>
Return a value of the request <a>attribute</a> on this <a>accessible
element</a>.
</p>
</section>
<section>
<h3>
<code>has</code> method
</h3>
<p>
Return true if the given <a>attribute</a> is present on the
<a>accessible element</a>.
</p>
<div class="note">
<p>
The method can be used to check whether the <a>accessible
element</a> has non empty text properties like <a>name</a>,
<a>description</a> or <a>text</a>.
</p>
</div>
</section>
<section>
<h3>
<code>to</code> method
</h3>
<p>
Return an object representing the requested <a>pattern</a> if exposed
by the <a>accessible element</a>. Otherwise returns null.
</p>
<div class="note">
<p>
The implementation is allowed to return same object or a new one.
</p>
</div>
<div class="note">
<p>
The implementation is allowed to expose predefined set of patterns
right on an <a>accessible element</a> object by default.
</p>
</div>
<p>
The example of queries <code>cell</code> pattern on a HTML td element
and logs its row and column indexes.
</p>
<pre class="example highlight">
var al = document.getElementById("td").a11ement;
if (al.is("cell")) {
let cell = al.to("cell");
console.log(cell.rowindex);
console.log(cell.colindex);
}
</pre>
</section>
<section>
<h3>
<code>relativeOf</code> method
</h3>
<p>
Returns a relative <a>accessible element</a> of the given <a>relation
type</a> for this <a>accessible element</a> if any. If the
<a>accessible element</a> has multiple relatives then the first one
is returned.
</p>
</section>
<section>
<h3>
<code>relativeOfAll</code> method
</h3>
<p>
Returns all relative <a>accessible elements</a> of the given relation
type for this <a>accessible element</a>. If there are no relatives
then empty sequence is returned.
</p>
</section>
<section>
<h3>
<code>actions</code> attribute
</h3>
<p>
Returns a set of all actions exposed by the <a>accessible
element</a>. Returned object implements <code>Actions</code>
interface.
</p>
<div class="note">
An <a>accessible element</a> may expose number of actions, for
example, a tree item accessible typically has two <a>actions</a>:
<code>activate</code>, which makes the tree item focused, and
<code>expand</code> / <code>collapse</code> action, which expands or
collapses its subtree.
</div>
<div class="note">
Here's a demo list of possible <a>actions</a>:
<dl>
<dt>
<code>activate</code>
</dt>
<dd>
Exposed on accessible elements that may be activated. Accessible
elements may use other names for this action to emphasize the
semantics they expose. For example, <code>jump</code> on links,
<code>press</code> on buttons, <code>check</code> and
<code>uncheck</code> on checkboxes. Accessible element may
provide more than one action. For example, tree item can provide
<code>select</code> / <code>unselect</code> as its primary action
and <code>expand</code> / <code>collapse</code> as secondary.
Tree column may implement <code>sort</code> action.
</dd>
<dt>
<code>focus</code>
</dt>
<dd>
Focus on an accessible element. May be different from "activate"
action, for example, in case of buttons where "activate" means
press.
</dd>
<dt>
<code>scroll</code>
</dt>
<dd>
Scrolls an accessible element into view, optionally takes
coordinates relative the element to scroll the view to. Extra
parameter: delta of <code>ScrollDelta</code>.
</dd>
<dt>
<code>drag</code> and <code>drop</code>
</dt>
<dd>
Used to start dragging and dropping the content related to the
accessible element the action is invoked on.
</dd>
<dt>
<code>zoom</code>
</dt>
<dd>
Zooms the content corresponding the accessible the action is
invoked on. Extra parameters: ratio of unsigned double. Values
greater than 1 zoom in the area, values lesser than 1 zoom out
it. 1 brings the area to its normal size.
</dd>
<dt>
<code>undo</code> and <code>redo</code>
</dt>
<dd>
Performs clipboard operations on the accessible element of the
editable content.
</dd>
</dl>
</div>
</section>
<section>
<h3>
<code>activate</code> method
</h3>
<p>
Invokes the given <a>action</a> on the <a>accessible element</a>.
</p>
<div class="note">
The method may take extra information to invoke an <a>action</a>. For
example, <code>zoom</code> action may take a zoom ratio as a
parameter to change the zoom.
</div>
<p>
The example below zooms the document by ratio of 2 and then back to
normal.
</p>
<pre class="example highlight">
var al = document.a11ement;
al.activate("zoom", 2);
al.activate("zoom", 1);
</pre>
<p>
The second example scrolls the page to (400, 100) point and then
scrolls it 2 pages down.
</p>
<pre class="example highlight">
al.activate("scroll", { x: 400, y: 100 });
al.activate("scroll", { mode: "page", count: 2 });
</pre>
</section>
<section>
<h3>
<code>interactionsOf</code> method
</h3>
<p>
Returns a list of all interactions for given <a>action</a> and device
if provided. Returned object implements <code>Interactions</code>
interface.
</p>
</section>
<section>
<h3>
<code>parent</code> attribute
</h3>
<p>
The <dfn><code>parent</code></dfn> attribute represents <a>accessible
parent</a> of this <a>accessible element</a>.
</p>
</section>
<section>
<h3>
<code>children</code> attribute
</h3>
<p>
The <dfn><code>children</code></dfn> attribute represents the child
accessible elements of this <a>accessible element</a>.
</p>
<p>
Returns <code>AccessibleChildren</code> object containing all child
<a>accessible elements</a>.
</p>
</section>
<section>
<h3>
<code>DOMNode</code> attribute
</h3>
<p>
Returns a DOM node associated with this <a>accessible element</a> if
any.
</p>
</section>
</section>
<section>
<h2>
Patterns
</h2>
<p>
The section lists general propose <a>patterns</a>, that can be exposed
by elements from any markup.
</p>
<section>
<h3>
<code>AccessibleItem</code>
</h3>
<p>
The <code>AccessibleItem</code> interface is exposed by accessible
elements that represent an article in an enumeration, like a list,
combobox, tree or grid widgets.
</p>
<pre class="idl">
interface AccessibleItem {
readonly attribute AccessibleElement? widget;
readonly attribute unsigned long index;
readonly attribute unsigned long size;
readonly attribute unsigned long level;
};
</pre>
<section>
<h4>
<code>widget</code> attribute
</h4>
<p>
Returns an accessible element for a widget associated with this
item. For example, it returns an HTML select accessible element for
HTML option, and HTML table accessible for its HTML td element.
</p>
</section>
<section>
<h4>
<code>index</code> attribute
</h4>
<p>
Returns an index of the item within its group.
</p>
</section>
<section>
<h4>
<code>size</code> attribute
</h4>
<p>
Returns the amount of items of the group this item belongs to.
</p>
</section>
<section>
<h4>
<code>level</code> attribute
</h4>
<p>
Returns the level of the item if applicable. For example, it returns
a nesting level in case of tree items.
</p>
</section>
</section>
<section>
<h3>
<code>AccessibleCell</code> interface
</h3>
<p>
The <code>AccessibleCell</code> interface is exposed by <a>accessible
elements</a> created for cell-like elements. For example, cells of
table, grid or tree table widgets.
</p>
<pre class="idl">
interface AccessibleCell {
readonly attribute unsigned long rowIndex;
readonly attribute unsigned long colIndex;
readonly attribute unsigned long rowSpan;
readonly attribute unsigned long colSpan;
};
</pre>
<section>
<h4>
<code>rowIndex</code> attribute
</h4>
<p>
Returns a row index of the cell within the table.
</p>
</section>
<section>
<h4>
<code>colIndex</code> attribute
</h4>
<p>
Returns a column index of the cell within the table.
</p>
</section>
<section>
<h4>
<code>rowSpan</code> attribute
</h4>
<p>
Returns a rows number the cell is spanned to.
</p>
</section>
<section>
<h4>
<code>colSpan</code> attribute
</h4>
<p>
Returns a columns number the cell is spanned to.
</p>
</section>
</section>
<section>
<h3>
<code>AccessibleValue</code> interface
</h3>
<p>
The <code>AccessibleValue</code> interface is exposed by
<a>accessible elements</a> having numerical value. Examples are
slider or meter widgets.
</p>
<pre class="idl">
interface AccessibleValue {
readonly attribute double max;
readonly attribute double min;
readonly attribute double low;
readonly attribute double high;
readonly attribute double optimum;
readonly attribute double step;
readonly attribute double value;
};
</pre>
<section>
<h4>
<code>max</code> attribute
</h4>
<p>
Returns an upper bound of a range.
</p>
</section>
<section>
<h4>
<code>min</code> attribute
</h4>
<p>
Returns a lower bound of a range.
</p>
</section>
<section>
<h4>
<code>low</code> attribute
</h4>
<p>
Returns a high limit of a low range.
</p>
</section>
<section>
<h4>
<code>high</code> attribute
</h4>
<p>
Returns a low limit of a high range.
</p>
</section>
<section>
<h4>
<code>optimum</code> attribute
</h4>
<p>
Returns an optimum value in gauge.
</p>
</section>
<section>
<h4>
<code>step</code> attribute
</h4>
<p>
Returns a minimal possible increment of value.
</p>
</section>
<section>
<h4>
<code>step</code> attribute
</h4>
<p>
Returns a current value of the widget.
</p>
</section>
</section>
</section>
<section>
<h2>
AccessiblePin interface
</h2>
<p>
<code>AccessiblePin</code> serves to traverse the content, for example,
if you need to navigate a document by headings or navigate a paragraph
by words. It describes an <a>accessible position</a> in the content.
The <a>accessible pin</a> can be moved into the given direction within
the document to the content complying with the given criteria. A
movement can be illustrated by verbal descriptions like "move the pin
forward to a next heading" or "move the pin one word back".
</p>
<pre class="idl">
[Constructor(AccessibleElement anchor, optional AccessibleElement root)]
interface AccessiblePin {
AccessiblePin? set(AccessibleElement anchor, Offset offset);
AccessiblePin? move(Where where, optional Criteria criteria);
readonly attribute AccessibleElement root;
readonly attribute AccessibleElement? anchor;
readonly attribute Offset;
};
enum Where {
"forward",
"backward"
};
enum Offset {
"before",
"at",
"after"