]> code.delx.au - gnu-emacs-elpa/blob - aria.rnc
Refine some ARIA checking to sync w/ current spec
[gnu-emacs-elpa] / aria.rnc
1 # #####################################################################
2 ## RELAX NG Schema for HTML 5: Accessible Rich Internet Applications #
3 # #####################################################################
4 #
5 # history: http://hsivonen.iki.fi/aria-html5-bis/
6
7 # #####################################################################
8 ## ARIA
9
10 ## Global states and properties
11
12 aria.global =
13 ( aria.prop.atomic?
14 & aria.state.busy?
15 & aria.prop.controls?
16 & aria.prop.describedby?
17 & aria.state.disabled?
18 & aria.state.dropeffect?
19 & aria.prop.flowto?
20 & aria.state.grabbed?
21 & aria.prop.haspopup?
22 & aria.state.hidden?
23 & aria.state.invalid?
24 & aria.prop.label?
25 & aria.prop.labelledby?
26 & aria.prop.live?
27 & aria.prop.owns?
28 & aria.prop.relevant?
29 )
30
31 common.attrs.other &= aria.global?
32
33 ## States and Properties for Native Roles
34
35 common.attrs.aria.implicit.button |=
36 ( aria.state.expanded?
37 & aria.state.pressed?
38 )
39
40 common.attrs.aria.implicit.checkbox |=
41 ( aria.state.checked? )
42
43 common.attrs.aria.implicit.combobox |=
44 ( aria.state.expanded?
45 & aria.prop.autocomplete?
46 & aria.prop.required?
47 & aria.prop.activedescendant?
48 )
49
50 common.attrs.aria.implicit.dialog |=
51 ( aria.state.expanded? )
52
53 common.attrs.aria.implicit.document |=
54 ( aria.state.expanded? )
55
56 common.attrs.aria.implicit.group |=
57 ( aria.state.expanded?
58 & aria.prop.activedescendant?
59 )
60
61 common.attrs.aria.implicit.heading |=
62 ( aria.state.expanded?
63 & aria.prop.level?
64 )
65
66 common.attrs.aria.implicit.img |=
67 ( aria.state.expanded? )
68
69 common.attrs.aria.implicit.link |=
70 ( aria.state.expanded? )
71
72 common.attrs.aria.implicit.listbox |=
73 ( aria.prop.multiselectable?
74 & aria.prop.required?
75 & aria.prop.activedescendant?
76 & aria.state.expanded?
77 )
78
79 common.attrs.aria.implicit.listitem |=
80 ( aria.prop.level?
81 & aria.prop.posinset?
82 & aria.prop.setsize?
83 & aria.state.expanded?
84 )
85
86 common.attrs.aria.implicit.option |=
87 ( aria.prop.posinset?
88 & aria.prop.setsize?
89 & aria.state.checked?
90 & aria.state.selected?
91 )
92
93 common.attrs.aria.implicit.progressbar |=
94 ( aria.prop.valuemax?
95 & aria.prop.valuemin?
96 & aria.prop.valuenow?
97 & aria.prop.valuetext?
98 )
99
100 common.attrs.aria.implicit.radio |=
101 ( aria.prop.posinset?
102 & aria.prop.setsize?
103 & aria.state.checked?
104 & aria.state.selected?
105 )
106
107 common.attrs.aria.implicit.slider |=
108 ( aria.prop.valuemax?
109 & aria.prop.valuemin?
110 & aria.prop.valuenow?
111 & aria.prop.valuetext?
112 & aria.prop.orientation?
113 )
114
115 common.attrs.aria.implicit.spinbutton |=
116 ( aria.prop.valuemax?
117 & aria.prop.valuemin?
118 & aria.prop.valuenow?
119 & aria.prop.valuetext?
120 & aria.prop.required?
121 )
122
123 common.attrs.aria.implicit.textbox |=
124 ( aria.prop.activedescendant?
125 & aria.prop.autocomplete?
126 & aria.prop.multiline?
127 & aria.prop.readonly?
128 & aria.prop.required?
129 )
130
131 common.attrs.aria.implicit.toolbar |=
132 ( aria.state.expanded?
133 & aria.prop.activedescendant?
134 )
135
136 common.attrs.aria.implicit.column-or-row-header |=
137 ( aria.prop.sort?
138 & aria.prop.readonly?
139 & aria.prop.required?
140 & aria.state.selected?
141 & aria.state.expanded?
142 )
143
144 #common.attrs.aria.implicit.select |=
145 # ( aria.state.invalid?
146 # & aria.prop.required?
147 # & aria.prop.atomic?
148 # & aria.state.busy?
149 # & aria.prop.channel?
150 # & aria.prop.controls?
151 # & aria.prop.live?
152 # & aria.prop.relevant?
153 # )
154
155 # section
156 # |
157 # |_ region
158 # |
159 # |_ article
160 # |
161 # |_ landmark
162 # | |_ banner
163 # | |_ complementary
164 # | |_ contentinfo
165 # | |_ main
166 # | |_ navigation
167 # |
168 # |_ list
169 # |
170 # |_ status
171
172 common.attrs.aria.implicit.section |=
173 ( aria.state.expanded? )
174
175 common.attrs.aria.implicit.region |= common.attrs.aria.implicit.section
176
177 common.attrs.aria.implicit.article |= common.attrs.aria.implicit.region
178 common.attrs.aria.implicit.landmark |= common.attrs.aria.implicit.region
179 common.attrs.aria.implicit.list |= common.attrs.aria.implicit.region
180 common.attrs.aria.implicit.status |= common.attrs.aria.implicit.region
181
182 common.attrs.aria.implicit.banner |= common.attrs.aria.implicit.landmark
183 common.attrs.aria.implicit.complementary |= common.attrs.aria.implicit.landmark
184 common.attrs.aria.implicit.contentinfo |= common.attrs.aria.implicit.landmark
185 common.attrs.aria.implicit.main |= common.attrs.aria.implicit.landmark
186 common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
187
188 # #####################################################################
189 ## States
190
191 ## busy
192 aria.state.busy =
193 attribute aria-busy
194 { string "true"
195 | string "false" #default
196 }
197
198 ## checked
199 aria.state.checked =
200 attribute aria-checked
201 { string "true"
202 | string "false"
203 | string "mixed"
204 | string "undefined" #default
205 }
206
207 ## disabled
208 aria.state.disabled =
209 attribute aria-disabled
210 { string "true"
211 | string "false" #default
212 }
213
214 ## dropeffect
215 aria.state.dropeffect =
216 attribute aria-dropeffect
217 { token "none" #default
218 | token "popup"
219 | token "execute"
220 | list
221 { ( string "copy" )
222 , ( string "execute" )?
223 }
224 | list
225 { ( string "move" )
226 , ( string "execute" )?
227 }
228 | list
229 { ( string "link" )
230 , ( string "execute" )?
231 }
232 | list
233 { ( string "execute" )
234 , ( string "copy" )
235 }
236 | list
237 { ( string "execute" )
238 , ( string "move" )
239 }
240 | list
241 { ( string "execute" )
242 , ( string "link" )
243 }
244 }
245
246 ## expanded
247 aria.state.expanded =
248 attribute aria-expanded
249 { string "true"
250 | string "false"
251 | string "undefined" #default
252 }
253
254 ## grabbed
255 aria.state.grabbed =
256 attribute aria-grabbed
257 { string "true"
258 | string "false"
259 | string "undefined" #default
260 }
261
262 ## hidden
263 aria.state.hidden =
264 attribute aria-hidden
265 { string "true"
266 | string "false" #default
267 }
268
269 ## invalid
270 aria.state.invalid =
271 attribute aria-invalid
272 { string "true"
273 | string "false" #default
274 | string "grammar"
275 | string "spelling"
276 }
277
278 ## pressed
279 aria.state.pressed =
280 attribute aria-pressed
281 { string "true"
282 | string "false"
283 | string "mixed"
284 | string "undefined" #default
285 }
286
287 ## selected
288 aria.state.selected =
289 attribute aria-selected
290 { string "true"
291 | string "false"
292 | string "undefined" #default
293 }
294
295
296
297 # #####################################################################
298 ## Properties
299
300 ## activedescendant
301 aria.prop.activedescendant =
302 attribute aria-activedescendant {
303 common.data.idref #REVISIT add Schematron check
304 }
305
306 ## atomic
307 aria.prop.atomic =
308 attribute aria-atomic
309 { string "true"
310 | string "false" #default
311 }
312
313 ## autocomplete
314 aria.prop.autocomplete =
315 attribute aria-autocomplete
316 { string "inline"
317 | string "list"
318 | string "both"
319 | string "none" #default
320 }
321
322 ## controls
323 aria.prop.controls =
324 attribute aria-controls {
325 common.data.idrefs #REVISIT add Schematron check
326 }
327
328 ## describedby
329 aria.prop.describedby =
330 attribute aria-describedby {
331 common.data.idrefs #REVISIT add Schematron check
332 }
333
334 ## flowto
335 aria.prop.flowto =
336 attribute aria-flowto {
337 common.data.idrefs #REVISIT add Schematron check
338 }
339
340 ## haspopup
341 aria.prop.haspopup =
342 attribute aria-haspopup
343 { string "true" #REVISIT check owns or descendant
344 | string "false" #default
345 }
346
347 ## label
348 aria.prop.label =
349 attribute aria-label {
350 string
351 }
352
353 ## labelledby
354 aria.prop.labelledby =
355 attribute aria-labelledby {
356 common.data.idrefs #REVISIT add Schematron check
357 }
358
359 ## level
360 aria.prop.level =
361 attribute aria-level {
362 common.data.integer.positive
363 }
364
365 ## live
366 aria.prop.live =
367 attribute aria-live
368 { string "off" #default
369 | string "polite"
370 | string "assertive"
371 }
372
373 ## multiline
374 aria.prop.multiline =
375 attribute aria-multiline
376 { string "true"
377 | string "false" #default
378 }
379
380 ## multiselectable
381 aria.prop.multiselectable =
382 attribute aria-multiselectable
383 { string "true"
384 | string "false" #default
385 }
386
387 ## orientation
388 aria.prop.orientation =
389 attribute aria-orientation
390 { string "vertical"
391 | string "horizontal" #default
392 }
393
394 ## owns
395 aria.prop.owns =
396 attribute aria-owns {
397 common.data.idrefs #REVISIT add Schematron check
398 }
399
400 ## posinset
401 aria.prop.posinset =
402 attribute aria-posinset {
403 common.data.integer.positive
404 }
405
406 ## readonly
407 aria.prop.readonly =
408 attribute aria-readonly
409 { string "true"
410 | string "false" #default
411 }
412 common.attrs.aria.prop.readonly |= aria.prop.readonly
413
414 ## relevant
415 aria.prop.relevant =
416 attribute aria-relevant
417 { token "all"
418 | list
419 { ( string "additions" )
420 , ( string "removals" )?
421 , ( string "text" )?
422 }
423 | list
424 { ( string "additions" )
425 , ( string "text" )?
426 , ( string "removals" )?
427 }
428 | list
429 { ( string "removals" )
430 , ( string "additions" )?
431 , ( string "text" )?
432 }
433 | list
434 { ( string "removals" )
435 , ( string "text" )?
436 , ( string "additions" )?
437 }
438 | list
439 { ( string "text" )
440 , ( string "additions" )?
441 , ( string "removals" )?
442 }
443 | list
444 { ( string "text" )
445 , ( string "removals" )?
446 , ( string "additions" )?
447 }
448 }
449
450 ## required
451 aria.prop.required =
452 attribute aria-required
453 { string "true"
454 | string "false" #default
455 }
456
457 ## setsize
458 aria.prop.setsize =
459 attribute aria-setsize {
460 common.data.integer.non-negative
461 }
462
463 ## sort
464 aria.prop.sort =
465 attribute aria-sort
466 { string "ascending"
467 | string "descending"
468 | string "none" #default
469 | string "other"
470 }
471
472 ## valuemax
473 aria.prop.valuemax =
474 attribute aria-valuemax {
475 common.data.float #REVISIT
476 }
477
478 ## valuemin
479 aria.prop.valuemin =
480 attribute aria-valuemin {
481 common.data.float #REVISIT
482 }
483
484 ## valuenow
485 aria.prop.valuenow =
486 attribute aria-valuenow {
487 common.data.float #REVISIT
488 }
489
490 ## valuetext
491 aria.prop.valuetext =
492 attribute aria-valuetext {
493 string
494 }
495
496 # #####################################################################
497 ## Roles
498
499 ## alert
500 aria.alert =
501 ( aria.role.alert
502 & aria.state.expanded?
503 )
504 aria.role.alert =
505 attribute role { string "alert" }
506
507 common.attrs.aria |= aria.alert
508 common.attrs.aria.role.alert |= aria.alert
509
510 ## alertdialog
511 aria.alertdialog =
512 ( aria.role.alertdialog
513 & aria.state.expanded?
514 )
515 aria.role.alertdialog =
516 attribute role { string "alertdialog" }
517
518 common.attrs.aria |= aria.alertdialog
519 common.attrs.aria.role.alertdialog |= aria.alertdialog
520
521 ## application
522 aria.application =
523 ( aria.role.application
524 & aria.state.expanded?
525 )
526 aria.role.application =
527 attribute role { string "application" }
528
529 common.attrs.aria |= aria.application
530 common.attrs.aria.landmark.application |= aria.application
531
532 ## article
533 aria.article =
534 ( aria.role.article
535 & aria.state.expanded?
536 )
537 aria.role.article =
538 attribute role { string "article" }
539
540 common.attrs.aria |= aria.article
541 common.attrs.aria.landmark.article |= aria.article
542
543 ## banner
544 aria.banner =
545 ( aria.role.banner
546 & aria.state.expanded?
547 )
548 aria.role.banner =
549 attribute role { string "banner" }
550
551 common.attrs.aria |= aria.banner
552 common.attrs.aria.landmark.banner |= aria.banner
553
554 ## button
555 aria.button =
556 ( aria.role.button
557 & aria.state.expanded?
558 & aria.state.pressed? # not inherited
559 )
560 aria.role.button =
561 attribute role { string "button" }
562
563 common.attrs.aria |= aria.button
564 common.attrs.aria.role.button |= aria.button
565
566 ## checkbox
567 aria.checkbox =
568 ( aria.role.checkbox
569 & aria.state.checked #required!
570 )
571 aria.role.checkbox =
572 attribute role { string "checkbox" }
573
574 common.attrs.aria |= aria.checkbox
575 common.attrs.aria.role.checkbox |= aria.checkbox
576
577 # columnheader
578 aria.columnheader =
579 ( aria.role.columnheader
580 & aria.prop.sort? # not inherited
581 & aria.prop.readonly? # not inherited
582 & aria.state.selected? # not inherited
583 & aria.state.expanded?
584 & aria.prop.required?
585 )
586 aria.role.columnheader =
587 attribute role { string "columnheader" }
588
589 common.attrs.aria |= aria.columnheader
590
591 ## combobox
592 aria.combobox =
593 ( aria.role.combobox
594 & aria.prop.activedescendant?
595 & aria.state.expanded #required!
596 & aria.prop.autocomplete?
597 & aria.prop.required?
598 )
599 aria.role.combobox =
600 attribute role { string "combobox" }
601
602 common.attrs.aria |= aria.combobox
603 common.attrs.aria.role.combobox |= aria.combobox
604
605 ## complementary
606 aria.complementary =
607 ( aria.role.complementary
608 & aria.state.expanded?
609 )
610 aria.role.complementary =
611 attribute role { string "complementary" }
612
613 common.attrs.aria |= aria.complementary
614 common.attrs.aria.landmark.complementary |= aria.complementary
615
616 ## contentinfo
617 aria.contentinfo =
618 ( aria.role.contentinfo
619 & aria.state.expanded?
620 )
621 aria.role.contentinfo =
622 attribute role { string "contentinfo" }
623
624 common.attrs.aria |= aria.contentinfo
625 common.attrs.aria.landmark.contentinfo |= aria.contentinfo
626
627 ## definition
628 aria.definition =
629 ( aria.role.definition
630 & aria.state.expanded?
631 )
632 aria.role.definition =
633 attribute role { string "definition" }
634
635 common.attrs.aria |= aria.definition
636
637 ## dialog
638 aria.dialog =
639 ( aria.role.dialog
640 & aria.state.expanded?
641 )
642 aria.role.dialog =
643 attribute role { string "dialog" }
644
645 common.attrs.aria |= aria.dialog
646 common.attrs.aria.role.dialog |= aria.dialog
647
648 ## directory
649 aria.directory =
650 ( aria.role.directory
651 & aria.state.expanded?
652 )
653 aria.role.directory =
654 attribute role { string "directory" }
655
656 common.attrs.aria |= aria.directory
657 common.attrs.aria.role.directory |= aria.directory
658
659 ## document
660 aria.document =
661 ( aria.role.document
662 & aria.state.expanded?
663 )
664 aria.role.document =
665 attribute role { string "document" }
666
667 common.attrs.aria |= aria.document
668 common.attrs.aria.landmark.document |= aria.document
669
670 ## form
671 aria.form =
672 ( aria.role.form
673 & aria.state.expanded?
674 )
675 aria.role.form =
676 attribute role { string "form" }
677
678 common.attrs.aria |= aria.form
679 common.attrs.aria.landmark.form |= aria.form
680
681 ## grid
682 aria.grid =
683 ( aria.role.grid
684 & aria.prop.level? # not inherited
685 & aria.prop.multiselectable? # not inherited
686 & aria.prop.readonly? # not inherited
687 & aria.prop.activedescendant?
688 & aria.state.expanded?
689 )
690 aria.role.grid =
691 attribute role { string "grid" }
692
693 common.attrs.aria |= aria.grid
694
695 ## gridcell
696 aria.gridcell =
697 ( aria.role.gridcell
698 & aria.prop.level? # net inherited
699 & aria.prop.readonly? # not inherited
700 & aria.state.selected? # not inherited
701 & aria.state.expanded?
702 & aria.prop.required?
703 )
704 aria.role.gridcell =
705 attribute role { string "gridcell" }
706
707 common.attrs.aria |= aria.gridcell
708
709 ## group
710 aria.group =
711 ( aria.role.group
712 & aria.prop.activedescendant? # not inherited
713 & aria.state.expanded? # not inherited
714 )
715 aria.role.group =
716 attribute role { string "group" }
717
718 common.attrs.aria |= aria.group
719 common.attrs.aria.role.group |= aria.group
720
721 ## heading
722 aria.heading =
723 ( aria.role.heading
724 & aria.prop.level ? # not inherited
725 & aria.state.expanded?
726 )
727 aria.role.heading =
728 attribute role { string "heading" }
729
730 common.attrs.aria |= aria.heading
731 common.attrs.aria.role.heading |= aria.heading
732
733 ## img
734 aria.img =
735 ( aria.role.img
736 & aria.state.expanded?
737 )
738 aria.role.img =
739 attribute role { string "img" }
740
741 common.attrs.aria |= aria.img
742 common.attrs.aria.role.img |= aria.img
743
744 ## link
745 aria.link =
746 ( aria.role.link
747 & aria.state.expanded?
748 )
749 aria.role.link =
750 attribute role { string "link" }
751
752 common.attrs.aria |= aria.link
753 common.attrs.aria.role.link |= aria.link
754
755 ## list
756 aria.list =
757 ( aria.role.list
758 & aria.state.expanded?
759 )
760 aria.role.list =
761 attribute role { string "list" }
762
763 common.attrs.aria |= aria.list
764 common.attrs.aria.role.list |= aria.list
765
766 ## listbox
767 aria.listbox =
768 ( aria.role.listbox
769 & aria.prop.multiselectable? # not inherited
770 & aria.prop.required?
771 & aria.prop.activedescendant?
772 & aria.state.expanded?
773 )
774 aria.role.listbox =
775 attribute role { string "listbox" }
776
777 common.attrs.aria |= aria.listbox
778 common.attrs.aria.role.listbox |= aria.listbox
779
780 ## listitem
781 aria.listitem =
782 ( aria.role.listitem
783 & aria.prop.posinset? # not inherited
784 & aria.prop.setsize? # not inherited
785 & aria.prop.level? # not inherited
786 & aria.state.expanded?
787 )
788 aria.role.listitem =
789 attribute role { string "listitem" }
790
791 common.attrs.aria |= aria.listitem
792 common.attrs.aria.role.listitem |= aria.listitem
793
794 ## log
795 aria.log =
796 ( aria.role.log
797 & aria.state.expanded?
798 )
799 aria.role.log =
800 attribute role { string "log" }
801
802 common.attrs.aria |= aria.log
803 common.attrs.aria.role.log |= aria.log
804
805 ## main
806 aria.main =
807 ( aria.role.main
808 & aria.state.expanded?
809 )
810 aria.role.main =
811 attribute role { string "main" }
812
813 common.attrs.aria |= aria.main
814 common.attrs.aria.landmark.main |= aria.main
815
816 ## marquee
817 aria.marquee =
818 ( aria.role.marquee
819 & aria.state.expanded?
820 )
821 aria.role.marquee =
822 attribute role { string "marquee" }
823
824 common.attrs.aria |= aria.marquee
825 common.attrs.aria.role.marquee |= aria.marquee
826
827 ## math
828 aria.math =
829 ( aria.role.math
830 & aria.state.expanded?
831 )
832 aria.role.math =
833 attribute role { string "math" }
834
835 common.attrs.aria |= aria.math
836
837 ## menu
838 aria.menu =
839 ( aria.role.menu
840 & aria.prop.activedescendant?
841 & aria.state.expanded?
842 )
843 aria.role.menu =
844 attribute role { string "menu" }
845
846 common.attrs.aria |= aria.menu
847 common.attrs.aria.role.menu |= aria.menu
848
849 ## menubar
850 aria.menubar =
851 ( aria.role.menubar
852 & aria.prop.activedescendant?
853 & aria.state.expanded?
854 )
855 aria.role.menubar =
856 attribute role { string "menubar" }
857
858 common.attrs.aria |= aria.menubar
859 common.attrs.aria.role.menubar |= aria.menubar
860
861
862 ## menuitem
863 aria.menuitem =
864 ( aria.role.menuitem )
865 aria.role.menuitem =
866 attribute role { string "menuitem" }
867
868 common.attrs.aria |= aria.menuitem
869 common.attrs.aria.role.menuitem |= aria.menuitem
870
871 ## menuitemcheckbox
872 aria.menuitemcheckbox =
873 ( aria.role.menuitemcheckbox
874 & aria.state.checked #required
875 )
876 aria.role.menuitemcheckbox =
877 attribute role { string "menuitemcheckbox" }
878
879 common.attrs.aria |= aria.menuitemcheckbox
880 common.attrs.aria.role.menuitemcheckbox |= aria.menuitemcheckbox
881
882 ## menuitemradio
883 aria.menuitemradio =
884 ( aria.role.menuitemradio
885 & aria.state.checked #required
886 & aria.state.selected?
887 & aria.prop.posinset?
888 & aria.prop.setsize?
889 )
890 aria.role.menuitemradio =
891 attribute role { string "menuitemradio" }
892
893 common.attrs.aria |= aria.menuitemradio
894 common.attrs.aria.role.menuitemradio |= aria.menuitemradio
895
896 ## navigation
897 aria.navigation =
898 ( aria.role.navigation
899 & aria.state.expanded?
900 )
901 aria.role.navigation =
902 attribute role { string "navigation" }
903
904 common.attrs.aria |= aria.navigation
905 common.attrs.aria.landmark.navigation |= aria.navigation
906
907 ## note
908 aria.note =
909 ( aria.role.note
910 & aria.state.expanded?
911 )
912 aria.role.note =
913 attribute role { string "note" }
914
915 common.attrs.aria |= aria.note
916 common.attrs.aria.landmark.note |= aria.note
917
918 ## option
919 aria.option =
920 ( aria.role.option
921 & aria.state.checked? # not inherited
922 & aria.state.selected? # not inherited
923 & aria.prop.posinset?
924 & aria.prop.setsize?
925 )
926 aria.role.option =
927 attribute role { string "option" }
928
929 common.attrs.aria |= aria.option
930 common.attrs.aria.role.option |= aria.option
931
932
933 ## presentation
934 aria.presentation =
935 ( aria.role.presentation
936 & aria.state.expanded?
937 )
938 aria.role.presentation =
939 attribute role { string "presentation" }
940
941 common.attrs.aria |= aria.presentation
942 common.attrs.aria.role.presentation |= aria.presentation
943
944 ## progressbar
945 aria.progressbar =
946 ( aria.role.progressbar
947 & aria.prop.valuemax? # not inherited
948 & aria.prop.valuemin? # not inherited
949 & aria.prop.valuenow? # not inherited
950 & aria.prop.valuetext? # not inherited
951 )
952 aria.role.progressbar =
953 attribute role { string "progressbar" }
954
955 common.attrs.aria |= aria.progressbar
956 common.attrs.aria.role.progressbar |= aria.progressbar
957
958 ## radio
959 aria.radio =
960 ( aria.role.radio
961 & aria.state.checked #required!
962 & aria.state.selected?
963 & aria.prop.posinset?
964 & aria.prop.setsize?
965 )
966 aria.role.radio =
967 attribute role { string "radio" }
968
969 common.attrs.aria |= aria.radio
970 common.attrs.aria.role.radio |= aria.radio
971
972 ## radiogroup
973 aria.radiogroup =
974 ( aria.role.radiogroup
975 & aria.prop.activedescendant?
976 & aria.state.expanded?
977 & aria.prop.required?
978 )
979 aria.role.radiogroup =
980 attribute role { string "radiogroup" }
981
982 common.attrs.aria |= aria.radiogroup
983
984 ## region
985 aria.region =
986 ( aria.role.region
987 & aria.state.expanded?
988 )
989 aria.role.region =
990 attribute role { string "region" }
991
992 common.attrs.aria |= aria.region
993 common.attrs.aria.role.region |= aria.region
994
995 ## row
996 aria.row =
997 ( aria.role.row
998 & aria.prop.level? # not inherited
999 & aria.state.selected? # not inherited
1000 & aria.prop.activedescendant?
1001 & aria.state.expanded?
1002 )
1003 aria.role.row =
1004 attribute role { string "row" }
1005
1006 common.attrs.aria |= aria.row
1007
1008 ## rowgroup
1009 aria.rowgroup =
1010 ( aria.role.rowgroup
1011 & aria.prop.activedescendant?
1012 & aria.state.expanded?
1013 )
1014 aria.role.rowgroup =
1015 attribute role { string "rowgroup" }
1016
1017 common.attrs.aria |= aria.rowgroup
1018
1019 # rowheader
1020 aria.rowheader =
1021 ( aria.role.rowheader
1022 & aria.prop.sort? # not inherited
1023 & aria.prop.readonly? # not inherited
1024 & aria.state.selected? # not inherited
1025 & aria.state.expanded?
1026 & aria.prop.required?
1027 )
1028 aria.role.rowheader =
1029 attribute role { string "rowheader" }
1030
1031 common.attrs.aria |= aria.rowheader
1032
1033 ## scrollbar
1034 aria.scrollbar =
1035 ( aria.role.scrollbar
1036 & aria.prop.orientation
1037 & aria.prop.valuemax
1038 & aria.prop.valuemin
1039 & aria.prop.valuenow
1040 & aria.prop.valuetext?
1041 )
1042 aria.role.scrollbar =
1043 attribute role { string "scrollbar" }
1044
1045 common.attrs.aria |= aria.scrollbar
1046
1047 ## search
1048 aria.search =
1049 ( aria.role.search
1050 & aria.state.expanded?
1051 )
1052 aria.role.search =
1053 attribute role { string "search" }
1054
1055 common.attrs.aria |= aria.search
1056 common.attrs.aria.landmark.search |= aria.search
1057
1058 ## separator
1059 aria.separator =
1060 ( aria.role.separator
1061 & aria.state.expanded?
1062 & aria.prop.orientation?
1063 )
1064 aria.role.separator =
1065 attribute role { string "separator" }
1066
1067 common.attrs.aria |= aria.separator
1068 common.attrs.aria.role.separator |= aria.separator
1069
1070 ## slider
1071 aria.slider =
1072 ( aria.role.slider
1073 & aria.prop.valuemax
1074 & aria.prop.valuemin
1075 & aria.prop.valuenow
1076 & aria.prop.valuetext?
1077 & aria.prop.orientation?
1078 )
1079 aria.role.slider =
1080 attribute role { string "slider" }
1081
1082 common.attrs.aria |= aria.slider
1083 common.attrs.aria.role.slider |= aria.slider
1084
1085 ## spinbutton
1086 aria.spinbutton =
1087 ( aria.role.spinbutton
1088 & aria.prop.valuemax
1089 & aria.prop.valuemin
1090 & aria.prop.valuenow
1091 & aria.prop.valuetext?
1092 & aria.prop.required?
1093 )
1094 aria.role.spinbutton =
1095 attribute role { string "spinbutton" }
1096
1097 common.attrs.aria |= aria.spinbutton
1098 common.attrs.aria.role.spinbutton |= aria.spinbutton
1099
1100 ## status
1101 aria.status =
1102 ( aria.role.status
1103 & aria.state.expanded?
1104 )
1105 aria.role.status =
1106 attribute role { string "status" }
1107
1108 common.attrs.aria |= aria.status
1109 common.attrs.aria.role.status |= aria.status
1110
1111 ## tab
1112 aria.tab =
1113 ( aria.role.tab
1114 & aria.state.selected?
1115 & aria.state.expanded?
1116 )
1117 aria.role.tab =
1118 attribute role { string "tab" }
1119
1120 common.attrs.aria |= aria.tab
1121 common.attrs.aria.role.tab |= aria.tab
1122
1123 ## tablist
1124 aria.tablist =
1125 ( aria.role.tablist
1126 & aria.prop.activedescendant?
1127 & aria.state.expanded?
1128 & aria.prop.level?
1129 & aria.prop.multiselectable?
1130 )
1131 aria.role.tablist =
1132 attribute role { string "tablist" }
1133 common.attrs.aria |= aria.tablist
1134 common.attrs.aria.role.tablist |= aria.tablist
1135
1136 ## tabpanel
1137 aria.tabpanel =
1138 ( aria.role.tabpanel
1139 & aria.state.expanded?
1140 )
1141 aria.role.tabpanel =
1142 attribute role { string "tabpanel" }
1143
1144 common.attrs.aria |= aria.tabpanel
1145 common.attrs.aria.role.tabpanel |= aria.tabpanel
1146
1147 ## textbox
1148 aria.textbox =
1149 ( aria.role.textbox
1150 & aria.prop.activedescendant?
1151 & aria.prop.autocomplete? # not inherited
1152 & aria.prop.multiline? # not inherited
1153 & aria.prop.readonly? # not inherited
1154 & aria.prop.required?
1155 )
1156 aria.role.textbox =
1157 attribute role { string "textbox" }
1158
1159 common.attrs.aria |= aria.textbox
1160 common.attrs.aria.role.textbox |= aria.textbox
1161
1162 ## timer
1163 aria.timer =
1164 ( aria.role.timer
1165 & aria.state.expanded?
1166 )
1167 aria.role.timer =
1168 attribute role { string "timer" }
1169
1170 common.attrs.aria |= aria.timer
1171
1172 ## toolbar
1173 aria.toolbar =
1174 ( aria.role.toolbar
1175 & aria.prop.activedescendant?
1176 & aria.state.expanded?
1177 )
1178 aria.role.toolbar =
1179 attribute role { string "toolbar" }
1180
1181 common.attrs.aria |= aria.toolbar
1182 common.attrs.aria.role.toolbar |= aria.toolbar
1183
1184 ## tooltip
1185 aria.tooltip =
1186 ( aria.role.tooltip
1187 & aria.state.expanded?
1188 )
1189 aria.role.tooltip =
1190 attribute role { string "tooltip" }
1191
1192 common.attrs.aria |= aria.tooltip
1193
1194 ## tree
1195 aria.tree =
1196 ( aria.role.tree
1197 & aria.prop.multiselectable? # not inherited
1198 & aria.prop.activedescendant?
1199 & aria.state.expanded?
1200 & aria.prop.required?
1201 )
1202 aria.role.tree =
1203 attribute role { string "tree" }
1204
1205 common.attrs.aria |= aria.tree
1206 common.attrs.aria.role.tree |= aria.tree
1207
1208 ## treegrid
1209 aria.treegrid =
1210 ( aria.role.treegrid
1211 & aria.prop.activedescendant?
1212 & aria.state.expanded?
1213 & aria.prop.level?
1214 & aria.prop.multiselectable?
1215 & aria.prop.readonly?
1216 & aria.prop.required?
1217 )
1218 aria.role.treegrid =
1219 attribute role { string "treegrid" }
1220
1221 common.attrs.aria |= aria.treegrid
1222
1223 ## treeitem
1224 aria.treeitem =
1225 ( aria.role.treeitem
1226 & aria.state.checked?
1227 & aria.state.expanded?
1228 & aria.prop.level?
1229 & aria.prop.posinset?
1230 & aria.state.selected?
1231 & aria.prop.setsize?
1232 )
1233 aria.role.treeitem =
1234 attribute role { string "treeitem" }
1235
1236 common.attrs.aria |= aria.treeitem
1237 common.attrs.aria.role.treeitem |= aria.treeitem