]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/html5-schema/aria.rnc
Add 'packages/html5-schema/' from commit '6e7c7c331e7f6692be6c7d39fb9485792f0d3513'
[gnu-emacs-elpa] / packages / html5-schema / aria.rnc
diff --git a/packages/html5-schema/aria.rnc b/packages/html5-schema/aria.rnc
new file mode 100644 (file)
index 0000000..61e007b
--- /dev/null
@@ -0,0 +1,1251 @@
+# #####################################################################
+##     RELAX NG Schema for HTML 5: Accessible Rich Internet Applications #
+# #####################################################################
+#
+# history: http://hsivonen.iki.fi/aria-html5-bis/
+
+# #####################################################################
+## ARIA
+
+## Global states and properties
+
+aria.global = 
+       (       aria.prop.atomic?
+       &       aria.state.busy?
+       &       aria.prop.controls?
+       &       aria.prop.describedby?
+       &       aria.state.disabled?
+       &       aria.state.dropeffect?
+       &       aria.prop.flowto?
+       &       aria.state.grabbed?
+       &       aria.prop.haspopup?
+       &       aria.state.hidden?
+       &       aria.state.invalid?
+       &       aria.prop.label?
+       &       aria.prop.labelledby?
+       &       aria.prop.live?
+       &       aria.prop.owns?
+       &       aria.prop.relevant?
+       )
+
+common.attrs.other &= aria.global?
+
+## States and Properties for Native Roles
+
+common.attrs.aria.implicit.button |=
+       (       aria.state.expanded?
+       &       aria.state.pressed?
+       )
+
+common.attrs.aria.implicit.checkbox |=
+       (       aria.state.checked? )
+
+common.attrs.aria.implicit.combobox |=
+       (       aria.state.expanded?
+       &       aria.prop.autocomplete?
+       &       aria.prop.required?
+       &       aria.prop.activedescendant?
+       )
+
+common.attrs.aria.implicit.dialog |=
+       (       aria.state.expanded? )
+
+common.attrs.aria.implicit.document |=
+       (       aria.state.expanded? )
+
+common.attrs.aria.implicit.form |=
+       (       aria.state.expanded? )
+
+common.attrs.aria.implicit.group |=
+       (       aria.state.expanded?
+       &       aria.prop.activedescendant?
+       )
+
+common.attrs.aria.implicit.heading |=
+       (       aria.state.expanded?
+       &       aria.prop.level?
+       )
+
+common.attrs.aria.implicit.img |=
+       (       aria.state.expanded? )
+
+common.attrs.aria.implicit.link |=
+       (       aria.state.expanded? )
+
+common.attrs.aria.implicit.listbox |=
+       (       aria.prop.multiselectable?
+       &       aria.prop.required?
+       &       aria.prop.activedescendant?
+       &       aria.state.expanded?
+       )
+
+common.attrs.aria.implicit.listitem |=
+       (       aria.prop.level?
+       &       aria.prop.posinset?
+       &       aria.prop.setsize?
+       &       aria.state.expanded?
+       )
+
+common.attrs.aria.implicit.option |=
+       (       aria.prop.posinset?
+       &       aria.prop.setsize?
+       &       aria.state.checked?
+       &       aria.state.selected?
+       )
+
+common.attrs.aria.implicit.progressbar |=
+       (       aria.prop.valuemax?
+       &       aria.prop.valuemin?
+       &       aria.prop.valuenow?
+       &       aria.prop.valuetext?
+       )
+
+common.attrs.aria.implicit.radio |=
+       (       aria.prop.posinset?
+       &       aria.prop.setsize?
+       &       aria.state.checked?
+       &       aria.state.selected?
+       )
+
+common.attrs.aria.implicit.slider |=
+       (       aria.prop.valuemax?
+       &       aria.prop.valuemin?
+       &       aria.prop.valuenow?
+       &       aria.prop.valuetext?
+       &       aria.prop.orientation?
+       )
+
+common.attrs.aria.implicit.spinbutton |=
+       (       aria.prop.valuemax?
+       &       aria.prop.valuemin?
+       &       aria.prop.valuenow?
+       &       aria.prop.valuetext?
+       &       aria.prop.required?
+       )
+
+common.attrs.aria.implicit.textbox |=
+       (       aria.prop.activedescendant?
+       &       aria.prop.autocomplete?
+       &       aria.prop.multiline?
+       &       aria.prop.readonly?
+       &       aria.prop.required?
+       )
+
+common.attrs.aria.implicit.toolbar |=
+       (       aria.state.expanded?
+       &       aria.prop.activedescendant?
+       )
+
+common.attrs.aria.implicit.column-or-row-header |=
+       (       aria.prop.sort?
+       &       aria.prop.readonly?
+       &       aria.prop.required?
+       &       aria.state.selected?
+       &       aria.state.expanded?
+       )
+
+#common.attrs.aria.implicit.select |=
+#              (       aria.state.invalid?
+#      &       aria.prop.required?
+#      &       aria.prop.atomic?
+#      &       aria.state.busy?
+#      &       aria.prop.channel?
+#      &       aria.prop.controls?
+#      &       aria.prop.live?
+#      &       aria.prop.relevant?
+#      )
+
+# section
+#   |
+#   |_ region
+#        |
+#        |_ article
+#        |
+#        |_ landmark
+#        |     |_ banner
+#        |     |_ complementary
+#        |     |_ contentinfo
+#        |     |_ main
+#        |     |_ navigation
+#        |
+#        |_ list
+#        |
+#        |_ status
+
+common.attrs.aria.implicit.section |=
+       ( aria.state.expanded? )
+
+common.attrs.aria.implicit.region |= common.attrs.aria.implicit.section
+
+common.attrs.aria.implicit.article |= common.attrs.aria.implicit.region
+common.attrs.aria.implicit.landmark |= common.attrs.aria.implicit.region
+common.attrs.aria.implicit.list |= common.attrs.aria.implicit.region
+common.attrs.aria.implicit.status |= common.attrs.aria.implicit.region
+
+common.attrs.aria.implicit.banner |= common.attrs.aria.implicit.landmark
+common.attrs.aria.implicit.complementary |= common.attrs.aria.implicit.landmark
+common.attrs.aria.implicit.contentinfo |= common.attrs.aria.implicit.landmark
+common.attrs.aria.implicit.main |= common.attrs.aria.implicit.landmark
+common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
+
+# #####################################################################
+## States
+
+## busy
+       aria.state.busy =
+               attribute aria-busy 
+                       {       string "true"
+                       |       string "false" #default
+                       }
+
+## checked
+       aria.state.checked =
+               attribute aria-checked 
+                       {       string "true"
+                       |       string "false"
+                       |       string "mixed"
+                       |       string "undefined" #default
+                       }
+
+## disabled
+       aria.state.disabled =
+               attribute aria-disabled 
+                       {       string "true"
+                       |       string "false" #default
+                       }
+
+## dropeffect
+       aria.state.dropeffect =
+               attribute aria-dropeffect
+                       {       token "none" #default
+                       | token "popup"
+                       | token "execute"
+                       |       list 
+                               {       ( string "copy" )
+                               ,       ( string "execute" )?
+                               }
+                       |       list 
+                               {       ( string "move" )
+                               ,       ( string "execute" )?
+                               }
+                       |       list 
+                               {       ( string "link" )
+                               ,       ( string "execute" )?
+                               }
+                       |       list 
+                               {       ( string "execute" )
+                               ,       ( string "copy" )
+                               }
+                       |       list 
+                               {       ( string "execute" )
+                               ,       ( string "move" )
+                               }
+                       |       list 
+                               {       ( string "execute" )
+                               ,       ( string "link" )
+                               }
+                       }
+
+## expanded
+       aria.state.expanded =
+               attribute aria-expanded 
+                       {       string "true"
+                       |       string "false"
+                       |       string "undefined" #default
+                       }
+
+## grabbed
+       aria.state.grabbed =
+               attribute aria-grabbed 
+                       {       string "true"
+                       |       string "false"
+                       |       string "undefined" #default
+                       }
+
+## hidden
+       aria.state.hidden =
+               attribute aria-hidden 
+                       {       string "true"
+                       |       string "false" #default
+                       }
+
+## invalid
+       aria.state.invalid =
+               attribute aria-invalid 
+                       {       string "true"
+                       |       string "false" #default
+                       |       string "grammar"
+                       |       string "spelling"
+                       }
+
+## pressed
+       aria.state.pressed =
+               attribute aria-pressed 
+                       {       string "true"
+                       |       string "false"
+                       |       string "mixed"
+                       |       string "undefined" #default
+                       }
+
+## selected
+       aria.state.selected =
+               attribute aria-selected 
+                       {       string "true"
+                       |       string "false"
+                       |       string "undefined" #default
+                       }
+
+
+
+# #####################################################################
+## Properties
+
+## activedescendant
+       aria.prop.activedescendant =
+               attribute aria-activedescendant {
+                       common.data.idref #REVISIT add Schematron check
+               }
+
+## atomic
+       aria.prop.atomic =
+               attribute aria-atomic
+                       {       string "true"
+                       |       string "false" #default
+                       }       
+
+## autocomplete
+       aria.prop.autocomplete =
+               attribute aria-autocomplete
+                       {       string "inline"
+                       |       string "list"
+                       |       string "both"
+                       |       string "none" #default
+                       }
+
+## controls
+       aria.prop.controls =
+               attribute aria-controls {
+                       common.data.idrefs #REVISIT add Schematron check
+               }
+
+## describedby
+       aria.prop.describedby =
+               attribute aria-describedby {
+                       common.data.idrefs #REVISIT add Schematron check
+               }
+
+## flowto
+       aria.prop.flowto =
+               attribute aria-flowto {
+                       common.data.idrefs #REVISIT add Schematron check
+               }
+
+## haspopup
+       aria.prop.haspopup =
+               attribute aria-haspopup
+                       {       string "true" #REVISIT check owns or descendant
+                       |       string "false" #default
+                       }       
+
+## label
+       aria.prop.label =
+               attribute aria-label {
+                       string
+               }
+
+## labelledby
+       aria.prop.labelledby =
+               attribute aria-labelledby {
+                       common.data.idrefs #REVISIT add Schematron check
+               }
+
+## level
+       aria.prop.level =
+               attribute aria-level {
+                       common.data.integer.positive
+               }
+
+## live
+       aria.prop.live =
+               attribute aria-live
+                       {       string "off" #default
+                       |       string "polite"
+                       |       string "assertive"
+                       }       
+
+## multiline
+       aria.prop.multiline =
+               attribute aria-multiline
+                       {       string "true"
+                       |       string "false" #default
+                       }       
+
+## multiselectable
+       aria.prop.multiselectable =
+               attribute aria-multiselectable
+                       {       string "true"
+                       |       string "false" #default
+                       }       
+
+## orientation
+       aria.prop.orientation =
+               attribute aria-orientation
+                       {       string "vertical"
+                       |       string "horizontal" #default
+                       }
+
+## owns
+       aria.prop.owns =
+               attribute aria-owns {
+                       common.data.idrefs #REVISIT add Schematron check
+               }
+
+## posinset
+       aria.prop.posinset =
+               attribute aria-posinset {
+                       common.data.integer.positive
+               }
+
+## readonly
+       aria.prop.readonly =
+               attribute aria-readonly
+                       {       string "true"
+                       |       string "false" #default
+                       }       
+       common.attrs.aria.prop.readonly |= aria.prop.readonly
+
+## relevant
+       aria.prop.relevant =
+               attribute aria-relevant
+                       {       token "all"
+                       |       list 
+                               {       ( string "additions" )
+                               ,       ( string "removals" )?
+                               ,       ( string "text" )?
+                               }
+                       |       list 
+                               {       ( string "additions" )
+                               ,       ( string "text" )?
+                               ,       ( string "removals" )?
+                               }
+                       |       list 
+                               {       ( string "removals" )
+                               ,       ( string "additions" )?
+                               ,       ( string "text" )?
+                               }
+                       |       list 
+                               {       ( string "removals" )
+                               ,       ( string "text" )?
+                               ,       ( string "additions" )?
+                               }
+                       |       list 
+                               {       ( string "text" )
+                               ,       ( string "additions" )?
+                               ,       ( string "removals" )?
+                               }
+                       |       list 
+                               {       ( string "text" )
+                               ,       ( string "removals" )?
+                               ,       ( string "additions" )?
+                               }
+                       }       
+
+## required
+       aria.prop.required =
+               attribute aria-required
+                       {       string "true"
+                       |       string "false" #default
+                       }       
+
+## setsize
+       aria.prop.setsize =
+               attribute aria-setsize {
+                       common.data.integer.non-negative
+               }
+
+## sort
+       aria.prop.sort =
+               attribute aria-sort
+                       {       string "ascending"
+                       |       string "descending"
+                       |       string "none" #default
+                       |       string "other"
+                       }       
+
+## valuemax
+       aria.prop.valuemax =
+               attribute aria-valuemax {
+                       common.data.float #REVISIT
+               }
+
+## valuemin
+       aria.prop.valuemin =
+               attribute aria-valuemin {
+                       common.data.float #REVISIT
+               }
+
+## valuenow
+       aria.prop.valuenow =
+               attribute aria-valuenow {
+                       common.data.float #REVISIT
+               }
+
+## valuetext
+       aria.prop.valuetext =
+               attribute aria-valuetext {
+                       string
+               }
+
+# #####################################################################
+## Roles
+
+## alert
+       aria.alert =
+               (       aria.role.alert
+               &       aria.state.expanded? 
+               )
+               aria.role.alert = 
+                       attribute role { string "alert" }
+       
+       common.attrs.aria |= aria.alert
+       common.attrs.aria.role.alert |= aria.alert
+
+## alertdialog
+       aria.alertdialog =
+               (       aria.role.alertdialog
+               &       aria.state.expanded?
+               )
+               aria.role.alertdialog = 
+                       attribute role { string "alertdialog" }
+       
+       common.attrs.aria |= aria.alertdialog
+       common.attrs.aria.role.alertdialog |= aria.alertdialog
+
+## application
+       aria.application =
+               (       aria.role.application
+               &       aria.state.expanded?
+               )
+               aria.role.application = 
+                       attribute role { string "application" }
+
+       common.attrs.aria |= aria.application
+       common.attrs.aria.landmark.application |= aria.application
+
+## article
+       aria.article =
+               (       aria.role.article
+               &       aria.state.expanded?
+               )
+               aria.role.article = 
+                       attribute role { string "article" }
+
+       common.attrs.aria |= aria.article
+       common.attrs.aria.landmark.article |= aria.article
+
+## banner
+       aria.banner =
+               (       aria.role.banner
+               &       aria.state.expanded?
+               )
+               aria.role.banner = 
+                       attribute role { string "banner" }
+       
+       common.attrs.aria |= aria.banner
+       common.attrs.aria.landmark.banner |= aria.banner
+       
+## button
+       aria.button =
+               (       aria.role.button
+               &       aria.state.expanded?
+               &       aria.state.pressed? # not inherited
+               )
+               aria.role.button = 
+                       attribute role { string "button" }
+       
+       common.attrs.aria |= aria.button
+       common.attrs.aria.role.button |= aria.button
+
+## checkbox
+       aria.checkbox =
+               (       aria.role.checkbox
+               &       aria.state.checked #required!
+               )
+               aria.role.checkbox = 
+                       attribute role { string "checkbox" }
+       
+       common.attrs.aria |= aria.checkbox
+       common.attrs.aria.role.checkbox |= aria.checkbox
+
+# columnheader
+       aria.columnheader =
+               (       aria.role.columnheader
+               &       aria.prop.sort? # not inherited
+               &       aria.prop.readonly? # not inherited
+               &       aria.state.selected? # not inherited
+               &       aria.state.expanded?
+               &       aria.prop.required?
+               )
+               aria.role.columnheader = 
+                       attribute role { string "columnheader" }
+       
+       common.attrs.aria |= aria.columnheader
+
+## combobox
+       aria.combobox =
+               (       aria.role.combobox
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded #required!
+               &       aria.prop.autocomplete?
+               &       aria.prop.required?
+               )
+               aria.role.combobox = 
+                       attribute role { string "combobox" }
+       
+       common.attrs.aria |= aria.combobox
+       common.attrs.aria.role.combobox |= aria.combobox
+
+## complementary
+       aria.complementary =
+               (       aria.role.complementary
+               &       aria.state.expanded?
+               )
+               aria.role.complementary = 
+                       attribute role { string "complementary" }
+
+       common.attrs.aria |= aria.complementary
+       common.attrs.aria.landmark.complementary |= aria.complementary
+
+## contentinfo
+       aria.contentinfo =
+               (       aria.role.contentinfo
+               &       aria.state.expanded?
+               )
+               aria.role.contentinfo = 
+                       attribute role { string "contentinfo" }
+
+       common.attrs.aria |= aria.contentinfo
+       common.attrs.aria.landmark.contentinfo |= aria.contentinfo
+
+## definition
+       aria.definition =
+               (       aria.role.definition
+               &       aria.state.expanded?
+               )
+               aria.role.definition = 
+                       attribute role { string "definition" }
+
+       common.attrs.aria |= aria.definition
+
+## dialog
+       aria.dialog =
+               (       aria.role.dialog
+               &       aria.state.expanded?
+               )
+               aria.role.dialog = 
+                       attribute role { string "dialog" }
+
+       common.attrs.aria |= aria.dialog
+       common.attrs.aria.role.dialog |= aria.dialog
+
+## directory
+       aria.directory =
+               (       aria.role.directory
+               &       aria.state.expanded?
+               )
+               aria.role.directory = 
+                       attribute role { string "directory" }
+
+       common.attrs.aria |= aria.directory
+       common.attrs.aria.role.directory |= aria.directory
+
+## document
+       aria.document =
+               (       aria.role.document
+               &       aria.state.expanded?
+               )
+               aria.role.document = 
+                       attribute role { string "document" }
+
+       common.attrs.aria |= aria.document
+       common.attrs.aria.landmark.document |= aria.document
+
+## form
+       aria.form =
+               (       aria.role.form
+               &       aria.state.expanded?
+               )
+               aria.role.form =
+                       attribute role { string "form" }
+
+       common.attrs.aria |= aria.form
+       common.attrs.aria.landmark.form |= aria.form
+
+## grid
+       aria.grid =
+               (       aria.role.grid
+               &       aria.prop.level? # not inherited
+               &       aria.prop.multiselectable? # not inherited
+               &       aria.prop.readonly? # not inherited
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.grid = 
+                       attribute role { string "grid" }
+       
+       common.attrs.aria |= aria.grid
+       
+## gridcell
+       aria.gridcell =
+               (       aria.role.gridcell
+               &       aria.prop.level? # net inherited
+               &       aria.prop.readonly? # not inherited
+               &       aria.state.selected? # not inherited
+               &       aria.state.expanded?
+               &       aria.prop.required?
+               )
+               aria.role.gridcell = 
+                       attribute role { string "gridcell" }
+       
+       common.attrs.aria |= aria.gridcell
+
+## group
+       aria.group =
+               (       aria.role.group
+               &       aria.prop.activedescendant? # not inherited
+               &       aria.state.expanded? # not inherited
+               )
+               aria.role.group = 
+                       attribute role { string "group" }
+       
+       common.attrs.aria |= aria.group
+       common.attrs.aria.role.group |= aria.group
+
+## heading
+       aria.heading =
+               (       aria.role.heading
+               &       aria.prop.level ? # not inherited
+               &       aria.state.expanded?
+               )
+               aria.role.heading =
+                       attribute role { string "heading" }
+       
+       common.attrs.aria |= aria.heading
+       common.attrs.aria.role.heading |= aria.heading
+
+## img
+       aria.img =
+               (       aria.role.img
+               &       aria.state.expanded?
+               )
+               aria.role.img = 
+                       attribute role { string "img" }
+       
+       common.attrs.aria |= aria.img
+       common.attrs.aria.role.img |= aria.img
+
+## link
+       aria.link =
+               (       aria.role.link
+               &       aria.state.expanded?
+               )
+               aria.role.link = 
+                       attribute role { string "link" }
+       
+       common.attrs.aria |= aria.link
+       common.attrs.aria.role.link |= aria.link
+
+## list
+       aria.list =
+               (       aria.role.list
+               &       aria.state.expanded?
+               )
+               aria.role.list = 
+                       attribute role { string "list" }
+       
+       common.attrs.aria |= aria.list
+       common.attrs.aria.role.list |= aria.list
+
+## listbox
+       aria.listbox =
+               (       aria.role.listbox
+               &       aria.prop.multiselectable? # not inherited
+               &       aria.prop.required?
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.listbox = 
+                       attribute role { string "listbox" }
+       
+       common.attrs.aria |= aria.listbox
+       common.attrs.aria.role.listbox |= aria.listbox
+
+## listitem
+       aria.listitem =
+               (       aria.role.listitem
+               &       aria.prop.posinset? # not inherited
+               &       aria.prop.setsize? # not inherited
+               &       aria.prop.level? # not inherited
+               &       aria.state.expanded?
+               )
+               aria.role.listitem = 
+                       attribute role { string "listitem" }
+       
+       common.attrs.aria |= aria.listitem
+       common.attrs.aria.role.listitem |= aria.listitem
+
+## log
+       aria.log =
+               (       aria.role.log
+               &       aria.state.expanded?
+               )
+               aria.role.log = 
+                       attribute role { string "log" }
+       
+       common.attrs.aria |= aria.log
+       common.attrs.aria.role.log |= aria.log
+
+## main
+       aria.main =
+               (       aria.role.main
+               &       aria.state.expanded?
+               )
+               aria.role.main = 
+                       attribute role { string "main" }
+       
+       common.attrs.aria |= aria.main
+       common.attrs.aria.landmark.main |= aria.main
+
+## marquee
+       aria.marquee =
+               (       aria.role.marquee
+               &       aria.state.expanded?
+               )
+               aria.role.marquee = 
+                       attribute role { string "marquee" }
+       
+       common.attrs.aria |= aria.marquee
+       common.attrs.aria.role.marquee |= aria.marquee
+
+## math
+       aria.math =
+               (       aria.role.math
+               &       aria.state.expanded?
+               )
+               aria.role.math = 
+                       attribute role { string "math" }
+       
+       common.attrs.aria |= aria.math
+
+## menu
+       aria.menu =
+               (       aria.role.menu
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.menu = 
+                       attribute role { string "menu" }
+       
+       common.attrs.aria |= aria.menu
+       common.attrs.aria.role.menu |= aria.menu
+
+## menubar
+       aria.menubar =
+               (       aria.role.menubar
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.menubar = 
+                       attribute role { string "menubar" }
+       
+       common.attrs.aria |= aria.menubar
+       common.attrs.aria.role.menubar |= aria.menubar
+
+
+## menuitem
+       aria.menuitem =
+               (       aria.role.menuitem )
+               aria.role.menuitem = 
+                       attribute role { string "menuitem" }
+       
+       common.attrs.aria |= aria.menuitem
+       common.attrs.aria.role.menuitem |= aria.menuitem
+
+## menuitemcheckbox
+       aria.menuitemcheckbox =
+               (       aria.role.menuitemcheckbox
+               &       aria.state.checked #required
+               )
+               aria.role.menuitemcheckbox = 
+                       attribute role { string "menuitemcheckbox" }
+       
+       common.attrs.aria |= aria.menuitemcheckbox
+       common.attrs.aria.role.menuitemcheckbox |= aria.menuitemcheckbox
+
+## menuitemradio
+       aria.menuitemradio =
+               (       aria.role.menuitemradio
+               &       aria.state.checked #required
+               &       aria.state.selected?
+               &       aria.prop.posinset?
+               &       aria.prop.setsize?
+               )
+               aria.role.menuitemradio = 
+                       attribute role { string "menuitemradio" }
+       
+       common.attrs.aria |= aria.menuitemradio
+       common.attrs.aria.role.menuitemradio |= aria.menuitemradio
+
+## navigation
+       aria.navigation =
+               (       aria.role.navigation
+               &       aria.state.expanded?
+               )
+               aria.role.navigation = 
+                       attribute role { string "navigation" }
+       
+       common.attrs.aria |= aria.navigation
+       common.attrs.aria.landmark.navigation |= aria.navigation
+
+## note
+       aria.note =
+               (       aria.role.note
+               &       aria.state.expanded?
+               )
+               aria.role.note = 
+                       attribute role { string "note" }
+       
+       common.attrs.aria |= aria.note
+       common.attrs.aria.landmark.note |= aria.note
+
+## option
+       aria.option =
+               (       aria.role.option
+               &       aria.state.checked? # not inherited
+               &       aria.state.selected? # not inherited
+               &       aria.prop.posinset?
+               &       aria.prop.setsize?
+               )
+               aria.role.option = 
+                       attribute role { string "option" }
+       
+       common.attrs.aria |= aria.option
+       common.attrs.aria.role.option |= aria.option
+
+
+## presentation
+       aria.presentation =
+               (       aria.role.presentation
+               &       aria.state.expanded?
+               )
+               aria.role.presentation = 
+                       attribute role { string "presentation" }
+       
+       common.attrs.aria |= aria.presentation
+       common.attrs.aria.role.presentation |= aria.presentation
+
+## progressbar
+       aria.progressbar =
+               (       aria.role.progressbar
+               &       aria.prop.valuemax? # not inherited
+               &       aria.prop.valuemin? # not inherited
+               &       aria.prop.valuenow? # not inherited
+               &       aria.prop.valuetext? # not inherited
+               )
+               aria.role.progressbar = 
+                       attribute role { string "progressbar" }
+       
+       common.attrs.aria |= aria.progressbar
+       common.attrs.aria.role.progressbar |= aria.progressbar
+
+## radio
+       aria.radio =
+               (       aria.role.radio
+               &       aria.state.checked #required!
+               &       aria.state.selected?
+               &       aria.prop.posinset?
+               &       aria.prop.setsize?
+               )
+               aria.role.radio = 
+                       attribute role { string "radio" }
+       
+       common.attrs.aria |= aria.radio
+       common.attrs.aria.role.radio |= aria.radio
+
+## radiogroup
+       aria.radiogroup =
+               (       aria.role.radiogroup
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               &       aria.prop.required?
+               )
+               aria.role.radiogroup = 
+                       attribute role { string "radiogroup" }
+       
+       common.attrs.aria |= aria.radiogroup
+
+## region
+       aria.region =
+               (       aria.role.region
+               &       aria.state.expanded?
+               )
+               aria.role.region = 
+                       attribute role { string "region" }
+       
+       common.attrs.aria |= aria.region
+       common.attrs.aria.role.region |= aria.region
+
+## row
+       aria.row =
+               (       aria.role.row
+               &       aria.prop.level? # not inherited
+               &       aria.state.selected? # not inherited
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.row = 
+                       attribute role { string "row" }
+       
+       common.attrs.aria |= aria.row
+
+## rowgroup
+       aria.rowgroup =
+               (       aria.role.rowgroup
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.rowgroup =
+                       attribute role { string "rowgroup" }
+
+       common.attrs.aria |= aria.rowgroup
+
+# rowheader
+       aria.rowheader =
+               (       aria.role.rowheader
+               &       aria.prop.sort? # not inherited
+               &       aria.prop.readonly? # not inherited
+               &       aria.state.selected? # not inherited
+               &       aria.state.expanded?
+               &       aria.prop.required?
+               )
+               aria.role.rowheader = 
+                       attribute role { string "rowheader" }
+       
+       common.attrs.aria |= aria.rowheader
+
+## scrollbar
+       aria.scrollbar =
+               (       aria.role.scrollbar
+               &       aria.prop.orientation
+               &       aria.prop.valuemax
+               &       aria.prop.valuemin
+               &       aria.prop.valuenow
+               &       aria.prop.valuetext?
+               )
+               aria.role.scrollbar =
+                       attribute role { string "scrollbar" }
+
+       common.attrs.aria |= aria.scrollbar
+
+## search
+       aria.search =
+               (       aria.role.search
+               &       aria.state.expanded?
+               )
+               aria.role.search = 
+                       attribute role { string "search" }
+       
+       common.attrs.aria |= aria.search
+       common.attrs.aria.landmark.search |= aria.search
+
+## separator
+       aria.separator =
+               (       aria.role.separator
+               &       aria.state.expanded?
+               &       aria.prop.orientation?
+               )
+               aria.role.separator = 
+                       attribute role { string "separator" }
+       
+       common.attrs.aria |= aria.separator
+       common.attrs.aria.role.separator |= aria.separator
+
+## slider
+       aria.slider =
+               (       aria.role.slider
+               &       aria.prop.valuemax
+               &       aria.prop.valuemin
+               &       aria.prop.valuenow
+               &       aria.prop.valuetext?
+               &       aria.prop.orientation?
+               )
+               aria.role.slider = 
+                       attribute role { string "slider" }
+       
+       common.attrs.aria |= aria.slider
+       common.attrs.aria.role.slider |= aria.slider
+
+## spinbutton
+       aria.spinbutton =
+               (       aria.role.spinbutton
+               &       aria.prop.valuemax
+               &       aria.prop.valuemin
+               &       aria.prop.valuenow
+               &       aria.prop.valuetext?
+               &       aria.prop.required?
+               )
+               aria.role.spinbutton = 
+                       attribute role { string "spinbutton" }
+       
+       common.attrs.aria |= aria.spinbutton
+       common.attrs.aria.role.spinbutton |= aria.spinbutton
+
+## status
+       aria.status =
+               (       aria.role.status
+               &       aria.state.expanded?
+               )
+               aria.role.status = 
+                       attribute role { string "status" }
+       
+       common.attrs.aria |= aria.status
+       common.attrs.aria.role.status |= aria.status
+
+## switch
+       aria.switch =
+               (       aria.role.switch
+               &       aria.state.checked #required!
+               )
+               aria.role.switch =
+                       attribute role { string "switch" }
+
+       common.attrs.aria |= aria.switch
+       common.attrs.aria.role.switch |= aria.switch
+
+## tab
+       aria.tab =
+               (       aria.role.tab
+               &       aria.state.selected?
+               &       aria.state.expanded?
+               )
+               aria.role.tab = 
+                       attribute role { string "tab" }
+       
+       common.attrs.aria |= aria.tab
+       common.attrs.aria.role.tab |= aria.tab
+
+## tablist
+       aria.tablist =
+               (       aria.role.tablist
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               &       aria.prop.level?
+               &       aria.prop.multiselectable?
+               )
+               aria.role.tablist = 
+                       attribute role { string "tablist" }
+       common.attrs.aria |= aria.tablist
+       common.attrs.aria.role.tablist |= aria.tablist
+
+## tabpanel
+       aria.tabpanel =
+               (       aria.role.tabpanel
+               &       aria.state.expanded?
+               )
+               aria.role.tabpanel = 
+                       attribute role { string "tabpanel" }
+       
+       common.attrs.aria |= aria.tabpanel
+       common.attrs.aria.role.tabpanel |= aria.tabpanel
+
+## textbox
+       aria.textbox =
+               (       aria.role.textbox
+               &       aria.prop.activedescendant?
+               &       aria.prop.autocomplete? # not inherited
+               &       aria.prop.multiline? # not inherited
+               &       aria.prop.readonly? # not inherited
+               &       aria.prop.required?
+               )
+               aria.role.textbox = 
+                       attribute role { string "textbox" }
+       
+       common.attrs.aria |= aria.textbox
+       common.attrs.aria.role.textbox |= aria.textbox
+
+## timer
+       aria.timer =
+               (       aria.role.timer
+               &       aria.state.expanded?
+               )
+               aria.role.timer = 
+                       attribute role { string "timer" }
+       
+       common.attrs.aria |= aria.timer
+
+## toolbar
+       aria.toolbar =
+               (       aria.role.toolbar
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               )
+               aria.role.toolbar = 
+                       attribute role { string "toolbar" }
+       
+       common.attrs.aria |= aria.toolbar
+       common.attrs.aria.role.toolbar |= aria.toolbar
+
+## tooltip
+       aria.tooltip =
+               (       aria.role.tooltip
+               &       aria.state.expanded?
+               )
+               aria.role.tooltip = 
+                       attribute role { string "tooltip" }
+       
+       common.attrs.aria |= aria.tooltip
+
+## tree
+       aria.tree =
+               (       aria.role.tree
+               &       aria.prop.multiselectable? # not inherited
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               &       aria.prop.required?
+               )
+               aria.role.tree = 
+                       attribute role { string "tree" }
+       
+       common.attrs.aria |= aria.tree
+       common.attrs.aria.role.tree |= aria.tree
+
+## treegrid
+       aria.treegrid =
+               (       aria.role.treegrid
+               &       aria.prop.activedescendant?
+               &       aria.state.expanded?
+               &       aria.prop.level?
+               &       aria.prop.multiselectable?
+               &       aria.prop.readonly?
+               &       aria.prop.required?
+               )
+               aria.role.treegrid = 
+                       attribute role { string "treegrid" }
+       
+       common.attrs.aria |= aria.treegrid
+
+## treeitem
+       aria.treeitem =
+               (       aria.role.treeitem
+               &       aria.state.checked?
+               &       aria.state.expanded?
+               &       aria.prop.level?
+               &       aria.prop.posinset?
+               &       aria.state.selected?
+               &       aria.prop.setsize?
+               )
+               aria.role.treeitem = 
+                       attribute role { string "treeitem" }
+       
+       common.attrs.aria |= aria.treeitem
+       common.attrs.aria.role.treeitem |= aria.treeitem