# #####################################################################
##	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.prop.braillelabel?
	&	aria.prop.brailleroledescription?
	&	aria.state.busy?
	&	aria.prop.controls?
	&	aria.state.current?
	&	aria.prop.describedby?
	&	aria.prop.details?
	&	aria.state.disabled?
	&	aria.prop.errormessage?
	&	aria.prop.flowto?
	&	aria.prop.haspopup?
	&	aria.state.hidden?
	&	aria.state.invalid?
	&	aria.prop.keyshortcuts?
	&	aria.prop.label?
	&	aria.prop.labelledby?
	&	aria.prop.live?
	&	aria.prop.owns?
	&	aria.prop.relevant?
	&	aria.prop.roledescription?
	&	aria.prop.description?
	)

## States and Properties for Native Roles

common.attrs.aria.implicit.button |=
	(	aria.state.expanded?
	&	aria.state.pressed?
	)

common.attrs.aria.implicit.cell |=
	(	aria.prop.colspan?
	&	aria.prop.rowspan?
	&	aria.prop.colindex?	# ARIA 1.1 and 1.2
	&	aria.prop.rowindex?
	)

common.attrs.aria.implicit.checkbox |=
	(	aria.state.checked?
	&	aria.state.expanded?
	&	aria.prop.readonly?
	&	aria.prop.required?
	)

common.attrs.aria.implicit.combobox |=
	(	aria.state.expanded?
	&	aria.prop.autocomplete?
	&	aria.prop.required?
	&	aria.prop.placeholder?
	&	aria.prop.activedescendant?
	&	aria.prop.readonly?
	)

common.attrs.aria.implicit.definition |=
	(	aria.state.expanded? )

common.attrs.aria.implicit.dialog |=
	(	aria.state.expanded?
	&	aria.prop.modal?
	)

common.attrs.aria.implicit.document |=
	(	aria.state.expanded? )

common.attrs.aria.implicit.figure |=
	(	aria.state.expanded? )

common.attrs.aria.implicit.form |=
	(	aria.state.expanded? )

common.attrs.aria.implicit.gridcell |=
	(	aria.prop.level? # net inherited
	&	aria.prop.readonly? # not inherited
	&	aria.state.selected? # not inherited
	&	aria.state.expanded?
	&	aria.prop.required?
	&	aria.prop.colspan?
	&	aria.prop.colindex?
	&	aria.prop.rowspan?
	&	aria.prop.rowindex?
	)

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?
	)

common.attrs.aria.implicit.listitem |=
	(	aria.prop.level?
	&	aria.prop.posinset?
	&	aria.prop.setsize?
	&	aria.state.expanded?
	)

common.attrs.aria.implicit.math |=
	(	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.required?
	&	aria.prop.setsize?
	&	aria.state.checked?
	&	aria.state.selected?
	)

common.attrs.aria.implicit.row |=
	(	aria.prop.level? # not inherited
	&	aria.state.selected? # not inherited
	&	aria.prop.activedescendant?
	&	aria.state.expanded?
	&	aria.prop.colindex?
	&	aria.prop.rowindex?
	&	aria.prop.posinset?		# ARIA 1.2 added
	&	aria.prop.setsize?		# ARIA 1.2 added
	)

common.attrs.aria.implicit.rowgroup |=
	(	aria.prop.activedescendant?
	&	aria.state.expanded?
	)

common.attrs.aria.implicit.searchbox |=
	(	aria.prop.activedescendant?
	&	aria.prop.autocomplete?
	&	aria.prop.multiline?
	&	aria.prop.placeholder?
	&	aria.prop.readonly?
	&	aria.prop.required?
	)

common.attrs.aria.implicit.separator |=
	(	aria.prop.valuemax?
	&	aria.prop.valuemin?
	&	aria.prop.valuenow?
	&	aria.prop.valuetext?
	&	aria.prop.orientation?
	)

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.placeholder?
	&	aria.prop.required?
	)

common.attrs.aria.implicit.table |=
	(	aria.prop.colcount?
	&	aria.prop.rowcount?
	)

common.attrs.aria.implicit.term |=
	(	aria.state.expanded? )

common.attrs.aria.implicit.textbox |=
	(	aria.prop.activedescendant?
	&	aria.prop.autocomplete?
	&	aria.prop.multiline?
	&	aria.prop.placeholder?
	&	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.prop.colspan?
	&	aria.prop.colindex?
	&	aria.prop.rowspan?
	&	aria.prop.rowindex?
	&	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
common.attrs.aria.implicit.search |= common.attrs.aria.implicit.landmark

# #####################################################################
## States

## busy
	aria.state.busy =
		attribute aria-busy 
			{	string "true"
			|	string "false" #default
			}

## current
	aria.state.current =
		attribute aria-current
			{	string "page"
			|	string "step"
			|	string "location"
			|	string "date"
			|	string "time"
			|	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
			}

## expanded
	aria.state.expanded =
		attribute aria-expanded 
			{	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
			}

## braillelabel
	aria.prop.braillelabel =
		attribute aria-braillelabel {
			string
		}

## brailleroledescription
	aria.prop.brailleroledescription =
		attribute aria-brailleroledescription {
			string
		}

## colcount
	aria.prop.colcount =
		attribute aria-colcount {
			(	common.data.integer.non-negative
                        |	string "-1"
                        )
		}

## colindex
	aria.prop.colindex =
		attribute aria-colindex {
			common.data.integer.positive
		}

## colspan
	aria.prop.colspan =
		attribute aria-colspan {
			common.data.integer.positive
		}

## 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
		}

## description
	aria.prop.description =
		attribute aria-description {
			string
		}

## details
	aria.prop.details =
		attribute aria-details {
			common.data.idref
		}

## errormessage
	aria.prop.errormessage =
		attribute aria-errormessage {
			common.data.idref
		}

## 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
			|	string "menu"
			|	string "listbox"
			|	string "tree"
			|	string "grid"
			|	string "dialog"
			}	

## keyshortcuts
	aria.prop.keyshortcuts =
		attribute aria-keyshortcuts {
			string
		}

## 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"
			}	

## modal
	aria.prop.modal =
		attribute aria-modal
			{	string "true"
			|	string "false" #default
			}

## 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
			|	string "undefined"
			}

## owns
	aria.prop.owns =
		attribute aria-owns {
			common.data.idrefs #REVISIT add Schematron check
		}

## placeholder
	aria.prop.placeholder =
		attribute aria-placeholder {
			string
		}

## 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
			}	

## roledescription
	aria.prop.roledescription =
		attribute aria-roledescription {
			string
		}

## rowcount
	aria.prop.rowcount =
		attribute aria-rowcount {
			(	common.data.integer.non-negative
                        |	string "-1"
                        )
		}

## rowindex
	aria.prop.rowindex =
		attribute aria-rowindex {
			common.data.integer.positive
		}

## rowspan
	aria.prop.rowspan =
		attribute aria-rowspan {
			common.data.integer.positive
		}

## setsize
	aria.prop.setsize =
		attribute aria-setsize {
			(	common.data.integer.non-negative
                        |	string "-1"
                        )
		}

## 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.prop.modal?
		)
		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.prop.activedescendant?		# ARIA 1.1 and 1.2
		)
		aria.role.application = 
			attribute role { string "application" }

	common.attrs.aria |= aria.application
	common.attrs.aria.role.application |= aria.application

## article
	aria.article =
		(	aria.role.article
		&	aria.state.expanded?
		&	aria.prop.posinset?		# ARIA 1.1 and 1.2
		&	aria.prop.setsize?		# ARIA 1.1 and 1.2
		)
		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

## blockquote - added in ARIA 1.2
	aria.blockquote =
		(	aria.role.blockquote
		)
		aria.role.blockquote =
			attribute role { string "blockquote" }
	
	common.attrs.aria |= aria.blockquote
	common.attrs.aria.role.blockquote |= aria.blockquote	

## 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

## caption - added in ARIA 1.2
	aria.caption =
		(	aria.role.caption
		)
		aria.role.caption =
			attribute role { string "caption" }

	common.attrs.aria |= aria.caption
	common.attrs.aria.role.caption |= aria.caption

## cell
	aria.cell =
		(	aria.role.cell
		&	aria.prop.colspan?
		&	aria.prop.colindex?
		&	aria.prop.rowspan?
		&	aria.prop.rowindex?
		)
		aria.role.cell =
			attribute role { string "cell" }
	common.attrs.aria |= aria.cell
	common.attrs.aria.role.cell |= aria.cell

## checkbox
	aria.checkbox =
		(	aria.role.checkbox
		&	aria.state.checked #required!
		&	aria.state.expanded?	# ARIA 1.2 added
		&	aria.prop.readonly? 	# ARIA 1.1 and 1.2
		&	aria.prop.required? 	# ARIA 1.2 added
		)
		aria.role.checkbox = 
			attribute role { string "checkbox" }
	
	common.attrs.aria |= aria.checkbox
	common.attrs.aria.role.checkbox |= aria.checkbox

## code - added in ARIA 1.2
	aria.code =
		(	aria.role.code
		)
		aria.role.code =
			attribute role { string "code" }

	common.attrs.aria |= aria.code
	common.attrs.aria.role.code |= aria.code

# 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.prop.colspan?
		&	aria.prop.rowspan?
		&	aria.prop.colindex?	# ARIA 1.1 and 1.2
		&	aria.prop.rowindex?
		)
		aria.role.columnheader = 
			attribute role { string "columnheader" }
	
	common.attrs.aria |= aria.columnheader
	common.attrs.aria.role.columnheader |= aria.columnheader

## combobox
	aria.combobox =
		#	aria.prop.controls TODO: required! add check to Assertions
		(	aria.role.combobox
		&	aria.prop.activedescendant?
		&	aria.state.expanded #required!
		&	aria.prop.autocomplete?
		&	aria.prop.required?
		&	aria.prop.readonly?
		&	aria.prop.orientation?
		)
		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
	common.attrs.aria.role.definition |= aria.definition

## deletion - added in ARIA 1.2
	aria.deletion =
		(	aria.role.deletion
		)
		aria.role.deletion =
			attribute role { string "deletion" }

	common.attrs.aria |= aria.deletion
	common.attrs.aria.role.deletion |= aria.deletion

## dialog
	aria.dialog =
		(	aria.role.dialog
		&	aria.state.expanded?
		&	aria.prop.modal?
		)
		aria.role.dialog = 
			attribute role { string "dialog" }

	common.attrs.aria |= aria.dialog
	common.attrs.aria.role.dialog |= aria.dialog

## 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

## emphasis - added in ARIA 1.2
	aria.emphasis =
		(	aria.role.emphasis
		)
		aria.role.emphasis =
			attribute role { string "emphasis" }

	common.attrs.aria |= aria.emphasis
	common.attrs.aria.role.emphasis |= aria.emphasis

## feed
	aria.feed =
		(	aria.role.feed
		&	aria.state.expanded?
		)
		aria.role.feed =
			attribute role { string "feed" }

	common.attrs.aria |= aria.feed
	common.attrs.aria.role.feed |= aria.feed

## figure
	aria.figure =
		(	aria.role.figure
		&	aria.state.expanded?
		)
		aria.role.figure =
			attribute role { string "figure" }

	common.attrs.aria |= aria.figure
	common.attrs.aria.role.figure |= aria.figure

## 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.prop.colcount?
		&	aria.prop.rowcount?
		)
		aria.role.grid = 
			attribute role { string "grid" }
	
	common.attrs.aria |= aria.grid
	common.attrs.aria.role.grid |= 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.prop.colspan?
		&	aria.prop.colindex?
		&	aria.prop.rowspan?
		&	aria.prop.rowindex?
		)
		aria.role.gridcell = 
			attribute role { string "gridcell" }
	
	common.attrs.aria |= aria.gridcell
	common.attrs.aria.role.gridcell |= 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

## graphics-document
	aria.graphics-document =
		(	aria.role.graphics-document )
		aria.role.graphics-document =
			attribute role { string "graphics-document" }
	common.attrs.aria |= aria.graphics-document
	common.attrs.aria.role.graphics-document |= aria.graphics-document

## graphics-object
	aria.graphics-object =
		(	aria.role.graphics-object )
		aria.role.graphics-object =
			attribute role { string "graphics-object" }
	common.attrs.aria |= aria.graphics-object
	common.attrs.aria.role.graphics-object |= aria.graphics-object

## graphics-symbol
	aria.graphics-symbol =
		(	aria.role.graphics-symbol )
		aria.role.graphics-symbol =
			attribute role { string "graphics-symbol" }
	common.attrs.aria |= aria.graphics-symbol
	common.attrs.aria.role.graphics-symbol |= aria.graphics-symbol

## heading
	aria.heading =
		(	aria.role.heading
		&	aria.prop.level 	# ARIA 1.1 and 1.2 required
		&	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

## image
	aria.image =
		(	aria.role.image
		&	aria.state.expanded?
		)
		aria.role.image = 
			attribute role { string "image" }
	
	common.attrs.aria |= aria.image
	common.attrs.aria.role.image |= aria.image

## insertion - added in ARIA 1.2
	aria.insertion =
		(	aria.role.insertion
		)
		aria.role.insertion =
			attribute role { string "insertion" }

	common.attrs.aria |= aria.insertion
	common.attrs.aria.role.insertion |= aria.insertion

## 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.prop.readonly? # ARIA 1.1 and 1.2
		&	aria.prop.orientation?
		)
		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
	common.attrs.aria.role.math |= aria.math

## menu
	aria.menu =
		(	aria.role.menu
		&	aria.prop.activedescendant?
		&	aria.state.expanded?
		&	aria.prop.orientation?
		)
		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.prop.orientation?
		)
		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.state.expanded?
		&	aria.prop.posinset?
		&	aria.prop.setsize?
		)
		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.state.expanded?	# ARIA 1.2 added
		&	aria.prop.posinset?		# ARIA 1.1 and 1.2
		&	aria.prop.setsize?		# ARIA 1.1 and 1.2
		)
		aria.role.menuitemcheckbox = 
			attribute role { string "menuitemcheckbox" }
	
	common.attrs.aria |= aria.menuitemcheckbox
	common.attrs.aria.role.menuitemcheckbox |= aria.menuitemcheckbox

## menuitemcheckbox w/o checked required
	aria.menuitemcheckbox-checked-not-required =
		(	aria.role.menuitemcheckbox
		&	aria.state.expanded?	# ARIA 1.2 added
		&	aria.prop.posinset?		# ARIA 1.1 and 1.2
		&	aria.prop.setsize?		# ARIA 1.1 and 1.2
		)
		aria.role.menuitemcheckbox-checked-not-required =
			attribute role { string "menuitemcheckbox" }
	common.attrs.aria.role.menuitemcheckbox-checked-not-required |= aria.menuitemcheckbox-checked-not-required

## menuitemradio
	aria.menuitemradio =
		(	aria.role.menuitemradio
		&	aria.state.checked #required
		&	aria.state.expanded?	# ARIA 1.2 added
		&	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

## menuitemradio w/o checked required
	aria.menuitemradio-checked-not-required =
		(	aria.role.menuitemradio
		&	aria.state.expanded?	# ARIA 1.2 added
		&	aria.state.selected?
		&	aria.prop.posinset?
		&	aria.prop.setsize?
		)
		aria.role.menuitemradio-checked-not-required =
			attribute role { string "menuitemradio" }
	common.attrs.aria.role.menuitemradio-checked-not-required |= aria.menuitemradio-checked-not-required

## meter - added in ARIA 1.2
	aria.meter =
		(	aria.role.meter
		&	aria.prop.valuemax? # optional
		&	aria.prop.valuemin? # optional
		&	aria.prop.valuetext? # inherited
		&	aria.prop.valuenow # required
		)		
		aria.role.meter =
			attribute role { string "meter" }

	common.attrs.aria |= aria.meter
	common.attrs.aria.role.meter |= aria.meter

## 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

## none
	aria.none =
		(	aria.role.none )
		aria.role.none =
			attribute role { string "none" }
	common.attrs.aria |= aria.none
	common.attrs.aria.role.none |= aria.none

## 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

## paragraph - added in ARIA 1.2
	aria.paragraph =
		(	aria.role.paragraph
		)
		aria.role.paragraph =
			attribute role { string "paragraph" }

	common.attrs.aria |= aria.paragraph
	common.attrs.aria.role.paragraph |= aria.paragraph

## presentation
	aria.presentation =
		(	aria.role.presentation )
		aria.role.presentation = 
			attribute role { string "presentation" }
	
	common.attrs.aria |= aria.presentation
	common.attrs.aria.role.presentation |= aria.presentation
	common.attrs.aria.role.presentation |= aria.none

## 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.readonly? # ARIA 1.1 and 1.2
		&	aria.prop.required?
		&	aria.prop.orientation?
		)
		aria.role.radiogroup = 
			attribute role { string "radiogroup" }
	
	common.attrs.aria |= aria.radiogroup
	common.attrs.aria.role.radiogroup |= 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.prop.colindex?
		&	aria.prop.rowindex?
		&	aria.prop.posinset?		# ARIA 1.2 added
		&	aria.prop.setsize?		# ARIA 1.2 added
		)
		aria.role.row = 
			attribute role { string "row" }
	
	common.attrs.aria |= aria.row
	common.attrs.aria.role.row |= 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
	common.attrs.aria.role.rowgroup |= 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.prop.colspan?
		&	aria.prop.rowspan?
		&	aria.prop.colindex?	# ARIA 1.1 and 1.2
		&	aria.prop.rowindex?
		)
		aria.role.rowheader = 
			attribute role { string "rowheader" }
	
	common.attrs.aria |= aria.rowheader
	common.attrs.aria.role.rowheader |= aria.rowheader

## searchbox
	aria.searchbox =
		(	aria.role.searchbox
		&	aria.prop.activedescendant?
		&	aria.prop.autocomplete?
		&	aria.prop.multiline?
		&	aria.prop.placeholder?	# ARIA 1.1 and 1.2
		&	aria.prop.readonly?
		&	aria.prop.required?
		)
		aria.role.searchbox =
			attribute role { string "searchbox" }
	common.attrs.aria |= aria.searchbox
	common.attrs.aria.role.searchbox |= aria.searchbox

## scrollbar
	aria.scrollbar =
		(	aria.role.scrollbar
		&	aria.prop.orientation?	# ARIA 1.2 optional
		&	aria.prop.valuemax? 	# ARIA 1.2 optional
		&	aria.prop.valuemin?		# ARIA 1.2 optional
		&	aria.prop.valuenow
		&	aria.prop.valuetext?
		)
		aria.role.scrollbar =
			attribute role { string "scrollbar" }

	common.attrs.aria |= aria.scrollbar
	common.attrs.aria.role.scrollbar |= aria.scrollbar

## search
	aria.search =
		(	aria.role.search
		&	aria.state.expanded?
		&	aria.prop.orientation?
		)
		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.prop.valuenow?		# ARIA 1.2 (required if focusable, absent otherwise)
		&	aria.prop.valuemin?		# ARIA 1.2 (optional if focusable, absent otherwise)
		&	aria.prop.valuemax?		# ARIA 1.2 (optional if focusable, absent otherwise)
		&	aria.prop.valuetext?	# ARIA 1.2 (optional if focusable, absent otherwise)
		)
		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? 		# optional in ARIA 1.2
		&	aria.prop.valuemin? 		# optional in ARIA 1.2
		&	aria.prop.valuenow
		&	aria.prop.valuetext?
		&	aria.prop.readonly? 		# ARIA 1.1 and 1.2
		&	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? 			# optional in ARIA 1.2
		&	aria.prop.valuemin? 			# optional in ARIA 1.2
		&	aria.prop.valuenow? 			# optional in ARIA 1.2
		&	aria.prop.valuetext?
		&	aria.prop.activedescendant?		# ARIA 1.1 and 1.2
		&	aria.prop.readonly? 			# ARIA 1.1 and 1.2
		&	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

## strong - added in ARIA 1.2
	aria.strong =
		(	aria.role.strong
		)
		aria.role.strong =
			attribute role { string "strong" }

	common.attrs.aria |= aria.strong
	common.attrs.aria.role.strong |= aria.strong

## subscript - added in ARIA 1.2
	aria.subscript =
		(	aria.role.subscript
		)
		aria.role.subscript = 
			attribute role { string "subscript" }
	
	common.attrs.aria |= aria.subscript
	common.attrs.aria.role.subscript |= aria.subscript

## superscript - added in ARIA 1.2
	aria.superscript =
		(	aria.role.superscript
		)
		aria.role.superscript =
			attribute role { string "superscript" }

	common.attrs.aria |= aria.superscript
	common.attrs.aria.role.superscript |= aria.superscript

## switch
	aria.switch =
		(	aria.role.switch
		&	aria.state.checked #required!
		&	aria.state.expanded?	# ARIA 1.2 added
		&	aria.prop.readonly? 	# ARIA 1.1 and 1.2
		&	aria.prop.required? 	# ARIA 1.2 added
		)
		aria.role.switch =
			attribute role { string "switch" }

	common.attrs.aria |= aria.switch
	common.attrs.aria.role.switch |= aria.switch

## switch w/o checked required
	aria.switch-checked-not-required =
		(	aria.role.switch
		&	aria.state.expanded?	# ARIA 1.2 added
		&	aria.prop.readonly? 	# ARIA 1.1 and 1.2
		&	aria.prop.required? 	# ARIA 1.2 added
		)
		aria.role.switch-checked-not-required =
			attribute role { string "switch" }
	common.attrs.aria.role.switch-checked-not-required |= aria.switch-checked-not-required

## tab
	aria.tab =
		(	aria.role.tab
		&	aria.state.selected?
		&	aria.state.expanded?
		&	aria.prop.posinset?
		&	aria.prop.setsize?
		)
		aria.role.tab = 
			attribute role { string "tab" }
	
	common.attrs.aria |= aria.tab
	common.attrs.aria.role.tab |= aria.tab

## table
	aria.table =
		(	aria.role.table
		&	aria.prop.colcount?
		&	aria.prop.rowcount?
		)
		aria.role.table =
			attribute role { string "table" }
	common.attrs.aria |= aria.table
	common.attrs.aria.role.table |= aria.table

## tablist
	aria.tablist =
		(	aria.role.tablist
		&	aria.prop.activedescendant?
		&	aria.state.expanded?
		&	aria.prop.level?
		&	aria.prop.multiselectable?
		&	aria.prop.orientation?
		)
		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

## term
	aria.term =
		(	aria.role.term
		&	aria.state.expanded?
		)
		aria.role.term =
			attribute role { string "term" }
	common.attrs.aria |= aria.term
	common.attrs.aria.role.term |= aria.term

## textbox
	aria.textbox =
		(	aria.role.textbox
		&	aria.prop.activedescendant?
		&	aria.prop.autocomplete? # not inherited
		&	aria.prop.multiline? # not inherited
		&	aria.prop.placeholder?	# ARIA 1.1 and 1.2
		&	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

## time - added in ARIA 1.2
	aria.time =
		(	aria.role.time
		)
		aria.role.time =
			attribute role { string "time" }

	common.attrs.aria |= aria.time
	common.attrs.aria.role.time |= aria.time

## timer
	aria.timer =
		(	aria.role.timer
		&	aria.state.expanded?
		)
		aria.role.timer = 
			attribute role { string "timer" }
	
	common.attrs.aria |= aria.timer
	common.attrs.aria.role.timer |= aria.timer

## toolbar
	aria.toolbar =
		(	aria.role.toolbar
		&	aria.prop.activedescendant?
		&	aria.state.expanded?
		&	aria.prop.orientation?
		)
		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
	common.attrs.aria.role.tooltip |= aria.tooltip

## tree
	aria.tree =
		(	aria.role.tree
		&	aria.prop.multiselectable? # not inherited
		&	aria.prop.activedescendant?
		&	aria.state.expanded?
		&	aria.prop.required?
		&	aria.prop.orientation?
		)
		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.prop.orientation?
		&	aria.prop.colcount?
		&	aria.prop.rowcount?
		)
		aria.role.treegrid = 
			attribute role { string "treegrid" }
	
	common.attrs.aria |= aria.treegrid
	common.attrs.aria.role.treegrid |= 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

# #####################################################################
## https://w3c.github.io/aria/aria/dpub.html

	aria.doc-abstract = aria.role.doc-abstract
	aria.role.doc-abstract = attribute role { string "doc-abstract" }
	common.attrs.aria |= aria.doc-abstract
	common.attrs.aria.role.doc-abstract |= aria.doc-abstract

	aria.doc-acknowledgments = aria.role.doc-acknowledgments
	aria.role.doc-acknowledgments = attribute role { string "doc-acknowledgments" }
	common.attrs.aria |= aria.doc-acknowledgments
	common.attrs.aria.role.doc-acknowledgments |= aria.doc-acknowledgments

	aria.doc-afterword = aria.role.doc-afterword
	aria.role.doc-afterword = attribute role { string "doc-afterword" }
	common.attrs.aria |= aria.doc-afterword
	common.attrs.aria.role.doc-afterword |= aria.doc-afterword

	aria.doc-appendix = aria.role.doc-appendix
	aria.role.doc-appendix = attribute role { string "doc-appendix" }
	common.attrs.aria |= aria.doc-appendix
	common.attrs.aria.role.doc-appendix |= aria.doc-appendix

	aria.doc-backlink = aria.role.doc-backlink
	aria.role.doc-backlink = attribute role { string "doc-backlink" }
	common.attrs.aria |= aria.doc-backlink
	common.attrs.aria.role.doc-backlink |= aria.doc-backlink

	aria.doc-biblioentry = aria.role.doc-biblioentry
	aria.role.doc-biblioentry = attribute role { string "doc-biblioentry" }
	common.attrs.aria |= aria.doc-biblioentry
	common.attrs.aria.role.doc-biblioentry |= aria.doc-biblioentry

	aria.doc-bibliography = aria.role.doc-bibliography
	aria.role.doc-bibliography = attribute role { string "doc-bibliography" }
	common.attrs.aria |= aria.doc-bibliography
	common.attrs.aria.role.doc-bibliography |= aria.doc-bibliography

	aria.doc-biblioref = aria.role.doc-biblioref
	aria.role.doc-biblioref = attribute role { string "doc-biblioref" }
	common.attrs.aria |= aria.doc-biblioref
	common.attrs.aria.role.doc-biblioref |= aria.doc-biblioref

	aria.doc-chapter = aria.role.doc-chapter
	aria.role.doc-chapter = attribute role { string "doc-chapter" }
	common.attrs.aria |= aria.doc-chapter
	common.attrs.aria.role.doc-chapter |= aria.doc-chapter

	aria.doc-colophon = aria.role.doc-colophon
	aria.role.doc-colophon = attribute role { string "doc-colophon" }
	common.attrs.aria |= aria.doc-colophon
	common.attrs.aria.role.doc-colophon |= aria.doc-colophon

	aria.doc-conclusion = aria.role.doc-conclusion
	aria.role.doc-conclusion = attribute role { string "doc-conclusion" }
	common.attrs.aria |= aria.doc-conclusion
	common.attrs.aria.role.doc-conclusion |= aria.doc-conclusion

	aria.doc-cover = aria.role.doc-cover
	aria.role.doc-cover = attribute role { string "doc-cover" }
	common.attrs.aria |= aria.doc-cover
	common.attrs.aria.role.doc-cover |= aria.doc-cover

	aria.doc-credit = aria.role.doc-credit
	aria.role.doc-credit = attribute role { string "doc-credit" }
	common.attrs.aria |= aria.doc-credit
	common.attrs.aria.role.doc-credit |= aria.doc-credit

	aria.doc-credits = aria.role.doc-credits
	aria.role.doc-credits = attribute role { string "doc-credits" }
	common.attrs.aria |= aria.doc-credits
	common.attrs.aria.role.doc-credits |= aria.doc-credits

	aria.doc-dedication = aria.role.doc-dedication
	aria.role.doc-dedication = attribute role { string "doc-dedication" }
	common.attrs.aria |= aria.doc-dedication
	common.attrs.aria.role.doc-dedication |= aria.doc-dedication

	aria.doc-endnote = aria.role.doc-endnote
	aria.role.doc-endnote = attribute role { string "doc-endnote" }
	common.attrs.aria |= aria.doc-endnote
	common.attrs.aria.role.doc-endnote |= aria.doc-endnote

	aria.doc-endnotes = aria.role.doc-endnotes
	aria.role.doc-endnotes = attribute role { string "doc-endnotes" }
	common.attrs.aria |= aria.doc-endnotes
	common.attrs.aria.role.doc-endnotes |= aria.doc-endnotes

	aria.doc-epigraph = aria.role.doc-epigraph
	aria.role.doc-epigraph = attribute role { string "doc-epigraph" }
	common.attrs.aria |= aria.doc-epigraph
	common.attrs.aria.role.doc-epigraph |= aria.doc-epigraph

	aria.doc-epilogue = aria.role.doc-epilogue
	aria.role.doc-epilogue = attribute role { string "doc-epilogue" }
	common.attrs.aria |= aria.doc-epilogue
	common.attrs.aria.role.doc-epilogue |= aria.doc-epilogue

	aria.doc-errata = aria.role.doc-errata
	aria.role.doc-errata = attribute role { string "doc-errata" }
	common.attrs.aria |= aria.doc-errata
	common.attrs.aria.role.doc-errata |= aria.doc-errata

	aria.doc-example = aria.role.doc-example
	aria.role.doc-example = attribute role { string "doc-example" }
	common.attrs.aria |= aria.doc-example
	common.attrs.aria.role.doc-example |= aria.doc-example

	aria.doc-footnote = aria.role.doc-footnote
	aria.role.doc-footnote = attribute role { string "doc-footnote" }
	common.attrs.aria |= aria.doc-footnote
	common.attrs.aria.role.doc-footnote |= aria.doc-footnote

	aria.doc-foreword = aria.role.doc-foreword
	aria.role.doc-foreword = attribute role { string "doc-foreword" }
	common.attrs.aria |= aria.doc-foreword
	common.attrs.aria.role.doc-foreword |= aria.doc-foreword

	aria.doc-glossary = aria.role.doc-glossary
	aria.role.doc-glossary = attribute role { string "doc-glossary" }
	common.attrs.aria |= aria.doc-glossary
	common.attrs.aria.role.doc-glossary |= aria.doc-glossary

	aria.doc-glossref = aria.role.doc-glossref
	aria.role.doc-glossref = attribute role { string "doc-glossref" }
	common.attrs.aria |= aria.doc-glossref
	common.attrs.aria.role.doc-glossref |= aria.doc-glossref

	aria.doc-index = aria.role.doc-index
	aria.role.doc-index = attribute role { string "doc-index" }
	common.attrs.aria |= aria.doc-index
	common.attrs.aria.role.doc-index |= aria.doc-index

	aria.doc-introduction = aria.role.doc-introduction
	aria.role.doc-introduction = attribute role { string "doc-introduction" }
	common.attrs.aria |= aria.doc-introduction
	common.attrs.aria.role.doc-introduction |= aria.doc-introduction

	aria.doc-noteref = aria.role.doc-noteref
	aria.role.doc-noteref = attribute role { string "doc-noteref" }
	common.attrs.aria |= aria.doc-noteref
	common.attrs.aria.role.doc-noteref |= aria.doc-noteref

	aria.doc-notice = aria.role.doc-notice
	aria.role.doc-notice = attribute role { string "doc-notice" }
	common.attrs.aria |= aria.doc-notice
	common.attrs.aria.role.doc-notice |= aria.doc-notice

	aria.doc-pagebreak = aria.role.doc-pagebreak
	aria.role.doc-pagebreak = attribute role { string "doc-pagebreak" }
	common.attrs.aria |= aria.doc-pagebreak
	common.attrs.aria.role.doc-pagebreak |= aria.doc-pagebreak

	aria.doc-pagelist = aria.role.doc-pagelist
	aria.role.doc-pagelist = attribute role { string "doc-pagelist" }
	common.attrs.aria |= aria.doc-pagelist
	common.attrs.aria.role.doc-pagelist |= aria.doc-pagelist

	aria.doc-part = aria.role.doc-part
	aria.role.doc-part = attribute role { string "doc-part" }
	common.attrs.aria |= aria.doc-part
	common.attrs.aria.role.doc-part |= aria.doc-part

	aria.doc-preface = aria.role.doc-preface
	aria.role.doc-preface = attribute role { string "doc-preface" }
	common.attrs.aria |= aria.doc-preface
	common.attrs.aria.role.doc-preface |= aria.doc-preface

	aria.doc-prologue = aria.role.doc-prologue
	aria.role.doc-prologue = attribute role { string "doc-prologue" }
	common.attrs.aria |= aria.doc-prologue
	common.attrs.aria.role.doc-prologue |= aria.doc-prologue

	aria.doc-pullquote = aria.role.doc-pullquote
	aria.role.doc-pullquote = attribute role { string "doc-pullquote" }
	common.attrs.aria |= aria.doc-pullquote
	common.attrs.aria.role.doc-pullquote |= aria.doc-pullquote

	aria.doc-qna = aria.role.doc-qna
	aria.role.doc-qna = attribute role { string "doc-qna" }
	common.attrs.aria |= aria.doc-qna
	common.attrs.aria.role.doc-qna |= aria.doc-qna

	aria.doc-subtitle = aria.role.doc-subtitle
	aria.role.doc-subtitle = attribute role { string "doc-subtitle" }
	common.attrs.aria |= aria.doc-subtitle
	common.attrs.aria.role.doc-subtitle |= aria.doc-subtitle

	aria.doc-tip = aria.role.doc-tip
	aria.role.doc-tip = attribute role { string "doc-tip" }
	common.attrs.aria |= aria.doc-tip
	common.attrs.aria.role.doc-tip |= aria.doc-tip

	aria.doc-toc = aria.role.doc-toc
	aria.role.doc-toc = attribute role { string "doc-toc" }
	common.attrs.aria |= aria.doc-toc
	common.attrs.aria.role.doc-toc |= aria.doc-toc
