diff options
author | Tor Norbye <tnorbye@google.com> | 2013-04-24 10:43:41 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2013-04-24 10:43:41 -0700 |
commit | b17587c84879dd2ea42495f1fbdadbc806b9475b (patch) | |
tree | b4d9014f69cb8289627ddc75339a6b0b3fe1bc5e /xml/relaxng/src/resources/html5-schema | |
parent | b569bc6aa78f6eacf72e8b90622d300e1a9db25f (diff) | |
download | idea-b17587c84879dd2ea42495f1fbdadbc806b9475b.tar.gz |
Snapshot e242282deb41c328afbe971fc167e47ddfb26df9 from master branch of git://git.jetbrains.org/idea/community.git
Change-Id: Ifdc1818cde7b63f6d7bf42801f18c7f1557b8d85
Diffstat (limited to 'xml/relaxng/src/resources/html5-schema')
24 files changed, 1122 insertions, 218 deletions
diff --git a/xml/relaxng/src/resources/html5-schema/LICENSE b/xml/relaxng/src/resources/html5-schema/LICENSE index fd1093cc1c60..0a2a5e0dc68b 100644 --- a/xml/relaxng/src/resources/html5-schema/LICENSE +++ b/xml/relaxng/src/resources/html5-schema/LICENSE @@ -2,7 +2,7 @@ The RELAX NG Schema for (X)HTML 5 is licensed under the MIT open source license. The following legal notice applies to all files in this directory: Copyright (c) 2005-2007 Elika J. Etemad (fantasai) and Henri Sivonen (hsivonen) -Copyright (c) 2007-2008 Mozilla Foundation +Copyright (c) 2007-2012 Mozilla Foundation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/xml/relaxng/src/resources/html5-schema/applications.rnc b/xml/relaxng/src/resources/html5-schema/applications.rnc index bf27090d5950..a98c20df4935 100644 --- a/xml/relaxng/src/resources/html5-schema/applications.rnc +++ b/xml/relaxng/src/resources/html5-schema/applications.rnc @@ -43,8 +43,8 @@ datatypes w = "http://whattf.org/datatype-draft" common.attrs.dropzone = attribute dropzone { list { - ( xsd:string { pattern = "[sS]:.+" } - | xsd:string { pattern = "[fF]:.+" } + ( xsd:string { pattern = "[sS][tT][rR][iI][nN][gG]:.+" } + | xsd:string { pattern = "[fF][iI][lL][eE]:.+" } )* , ( w:string "copy" @@ -52,8 +52,8 @@ datatypes w = "http://whattf.org/datatype-draft" | w:string "link" )? , - ( xsd:string { pattern = "[sS]:.+" } - | xsd:string { pattern = "[fF]:.+" } + ( xsd:string { pattern = "[sS][tT][rR][iI][nN][gG]:.+" } + | xsd:string { pattern = "[fF][iI][lL][eE]:.+" } )* } } @@ -89,6 +89,10 @@ datatypes w = "http://whattf.org/datatype-draft" ( common.attrs & progress.attrs.value? & progress.attrs.max? + & ( common.attrs.aria.role.progressbar + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) progress.attrs.value = attribute value { @@ -103,6 +107,34 @@ datatypes w = "http://whattf.org/datatype-draft" common.elem.phrasing |= progress.elem +## Dialog box, inspector, or window: <dialog> + dialog.elem = + element dialog { dialog.inner & dialog.attrs } + dialog.attrs = + ( common.attrs + & dialog.attrs.open? + & ( common.attrs.aria.role.alert + | common.attrs.aria.role.alertdialog + | common.attrs.aria.role.contentinfo + | common.attrs.aria.role.dialog + | common.attrs.aria.role.log + | common.attrs.aria.role.main + | common.attrs.aria.role.marquee + | common.attrs.aria.role.region + | common.attrs.aria.role.status + | common.attrs.aria.landmark.application + | common.attrs.aria.landmark.document + | common.attrs.aria.landmark.search + )? + ) + dialog.attrs.open = + attribute open { + w:string "open" | w:string "" + } + dialog.inner = + ( common.inner.flow ) + common.elem.flow |= dialog.elem + ## Command with an associated action: <command type='command'> command.command.elem = @@ -111,6 +143,9 @@ datatypes w = "http://whattf.org/datatype-draft" ( common.attrs & command.command.attrs.type? & common-command.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) command.command.attrs.type = attribute type { @@ -124,11 +159,14 @@ datatypes w = "http://whattf.org/datatype-draft" element command { command.inner & command.radio.attrs } command.radio.attrs = ( common.attrs - & ( command.radio.attrs.type - & command.radio.attrs.radiogroup #REVISIT taking liberties here - & command.radio.attrs.checked? - ) - & common-command.attrs + & ( command.radio.attrs.type + & command.radio.attrs.radiogroup #REVISIT taking liberties here + & command.radio.attrs.checked? + ) + & common-command.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) command.radio.attrs.type = attribute type { @@ -150,11 +188,14 @@ datatypes w = "http://whattf.org/datatype-draft" element command { command.inner & command.checkbox.attrs } command.checkbox.attrs = ( common.attrs - & ( command.checkbox.attrs.type - & command.checkbox.attrs.checked? - ) - & common-command.attrs + & ( command.checkbox.attrs.type + & command.checkbox.attrs.checked? ) + & common-command.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) command.checkbox.attrs.type = attribute type { w:string "checkbox" @@ -197,6 +238,7 @@ datatypes w = "http://whattf.org/datatype-draft" ( common.attrs & menu.attrs.type? & menu.attrs.label? + & common.attrs.aria? # some roles only allowed if type is "toolbar" state; check in assertions ) menu.attrs.type = attribute type { @@ -219,7 +261,9 @@ datatypes w = "http://whattf.org/datatype-draft" mli.elem = element li { mli.inner & mli.attrs } mli.attrs = - ( common.attrs ) + ( common.attrs + & common.attrs.aria? + ) mli.inner = ( common.inner.flow ) @@ -244,7 +288,7 @@ datatypes w = "http://whattf.org/datatype-draft" common.data.integer.non-negative } canvas.inner.flow = - ( common.inner.flow ) + ( common.inner.transparent.flow ) canvas.inner.phrasing = ( common.inner.phrasing ) @@ -258,15 +302,50 @@ datatypes w = "http://whattf.org/datatype-draft" details.attrs = ( common.attrs & details.attrs.open? - & common.attrs.aria.implicit.region? + & ( common.attrs.aria.implicit.region # aria-expanded must be true if open attr present; check by assertions + | common.attrs.aria.role.alertdialog + | common.attrs.aria.role.banner + | common.attrs.aria.role.button + | common.attrs.aria.role.combobox + | common.attrs.aria.role.dialog + | common.attrs.aria.role.directory + | common.attrs.aria.role.heading + | common.attrs.aria.role.img + | common.attrs.aria.role.link + | common.attrs.aria.role.list + | common.attrs.aria.role.listbox + | common.attrs.aria.role.listitem + | common.attrs.aria.role.log + | common.attrs.aria.role.marquee + | common.attrs.aria.role.menu + | common.attrs.aria.role.menubar + | common.attrs.aria.role.note + | common.attrs.aria.role.separator + | common.attrs.aria.role.status + | common.attrs.aria.role.tab + | common.attrs.aria.role.tablist + | common.attrs.aria.role.tabpanel + | common.attrs.aria.role.toolbar + | common.attrs.aria.role.tree + | common.attrs.aria.role.treeitem + | common.attrs.aria.landmark.application + | common.attrs.aria.landmark.article + | common.attrs.aria.landmark.complementary + | common.attrs.aria.landmark.contentinfo + | common.attrs.aria.landmark.document + | common.attrs.aria.landmark.form + | common.attrs.aria.landmark.main + | common.attrs.aria.landmark.navigation + | common.attrs.aria.landmark.search + )? ) details.attrs.open = attribute open { w:string "open" | w:string "" } details.inner = - ( summary.elem? - , common.inner.flow + ( summary.elem + , common.inner.flow ) common.elem.flow |= details.elem @@ -276,6 +355,10 @@ datatypes w = "http://whattf.org/datatype-draft" summary.elem = element summary { summary.inner & summary.attrs } summary.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) summary.inner = ( common.inner.phrasing ) diff --git a/xml/relaxng/src/resources/html5-schema/aria.rnc b/xml/relaxng/src/resources/html5-schema/aria.rnc index 9721d36e0fdb..a7a30672aafa 100644 --- a/xml/relaxng/src/resources/html5-schema/aria.rnc +++ b/xml/relaxng/src/resources/html5-schema/aria.rnc @@ -315,6 +315,7 @@ common.attrs.aria.implicit.listitem |= { string "true" | string "false" #default } + common.attrs.aria.prop.readonly |= aria.prop.readonly ## relevant aria.prop.relevant = @@ -410,6 +411,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "alert" } common.attrs.aria |= aria.alert + common.attrs.aria.role.alert |= aria.alert ## alertdialog aria.alertdialog = @@ -420,6 +422,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "alertdialog" } common.attrs.aria |= aria.alertdialog + common.attrs.aria.role.alertdialog |= aria.alertdialog ## application aria.application = @@ -463,6 +466,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "button" } common.attrs.aria |= aria.button + common.attrs.aria.role.button |= aria.button ## checkbox aria.checkbox = @@ -474,7 +478,18 @@ common.attrs.aria.implicit.listitem |= common.attrs.aria |= aria.checkbox -# XXX columnheader +# 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.role.columnheader = + attribute role { string "columnheader" } + + common.attrs.aria |= aria.columnheader ## combobox aria.combobox = @@ -486,6 +501,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "combobox" } common.attrs.aria |= aria.combobox + common.attrs.aria.role.combobox |= aria.combobox ## complementary aria.complementary = @@ -528,6 +544,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "dialog" } common.attrs.aria |= aria.dialog + common.attrs.aria.role.dialog |= aria.dialog ## directory aria.directory = @@ -538,6 +555,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "directory" } common.attrs.aria |= aria.directory + common.attrs.aria.role.directory |= aria.directory ## document aria.document = @@ -550,6 +568,17 @@ common.attrs.aria.implicit.listitem |= 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 @@ -588,7 +617,17 @@ common.attrs.aria.implicit.listitem |= common.attrs.aria |= aria.group -## XXX heading +## 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 = @@ -599,6 +638,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "img" } common.attrs.aria |= aria.img + common.attrs.aria.role.img |= aria.img ## link aria.link = @@ -608,6 +648,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "link" } common.attrs.aria |= aria.link + common.attrs.aria.role.link |= aria.link ## list aria.list = @@ -618,6 +659,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "list" } common.attrs.aria |= aria.list + common.attrs.aria.role.list |= aria.list ## listbox aria.listbox = @@ -630,6 +672,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "listbox" } common.attrs.aria |= aria.listbox + common.attrs.aria.role.listbox |= aria.listbox ## listitem aria.listitem = @@ -643,6 +686,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "listitem" } common.attrs.aria |= aria.listitem + common.attrs.aria.role.listitem |= aria.listitem ## log aria.log = @@ -653,6 +697,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "log" } common.attrs.aria |= aria.log + common.attrs.aria.role.log |= aria.log ## main aria.main = @@ -674,6 +719,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "marquee" } common.attrs.aria |= aria.marquee + common.attrs.aria.role.marquee |= aria.marquee ## math aria.math = @@ -695,6 +741,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "menu" } common.attrs.aria |= aria.menu + common.attrs.aria.role.menu |= aria.menu ## menubar aria.menubar = @@ -706,6 +753,8 @@ common.attrs.aria.implicit.listitem |= attribute role { string "menubar" } common.attrs.aria |= aria.menubar + common.attrs.aria.role.menubar |= aria.menubar + ## menuitem aria.menuitem = @@ -714,6 +763,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "menuitem" } common.attrs.aria |= aria.menuitem + common.attrs.aria.role.menuitem |= aria.menuitem ## menuitemcheckbox aria.menuitemcheckbox = @@ -724,6 +774,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "menuitemcheckbox" } common.attrs.aria |= aria.menuitemcheckbox + common.attrs.aria.role.menuitemcheckbox |= aria.menuitemcheckbox ## menuitemradio aria.menuitemradio = @@ -735,6 +786,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "menuitemradio" } common.attrs.aria |= aria.menuitemradio + common.attrs.aria.role.menuitemradio |= aria.menuitemradio ## navigation aria.navigation = @@ -768,6 +820,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "option" } common.attrs.aria |= aria.option + common.attrs.aria.role.option |= aria.option ## presentation @@ -779,6 +832,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "presentation" } common.attrs.aria |= aria.presentation + common.attrs.aria.role.presentation |= aria.presentation ## progressbar aria.progressbar = @@ -792,6 +846,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "progressbar" } common.attrs.aria |= aria.progressbar + common.attrs.aria.role.progressbar |= aria.progressbar ## radio aria.radio = @@ -803,6 +858,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "radio" } common.attrs.aria |= aria.radio + common.attrs.aria.role.radio |= aria.radio ## radiogroup aria.radiogroup = @@ -824,6 +880,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "region" } common.attrs.aria |= aria.region + common.attrs.aria.role.region |= aria.region ## row aria.row = @@ -838,7 +895,18 @@ common.attrs.aria.implicit.listitem |= common.attrs.aria |= aria.row -# XXX rowheader +# 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.role.rowheader = + attribute role { string "rowheader" } + + common.attrs.aria |= aria.rowheader ## search aria.search = @@ -860,6 +928,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "separator" } common.attrs.aria |= aria.separator + common.attrs.aria.role.separator |= aria.separator ## slider aria.slider = @@ -873,6 +942,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "slider" } common.attrs.aria |= aria.slider + common.attrs.aria.role.slider |= aria.slider ## spinbutton aria.spinbutton = @@ -887,6 +957,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "spinbutton" } common.attrs.aria |= aria.spinbutton + common.attrs.aria.role.spinbutton |= aria.spinbutton ## status aria.status = @@ -898,6 +969,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "status" } common.attrs.aria |= aria.status + common.attrs.aria.role.status |= aria.status ## tab aria.tab = @@ -909,6 +981,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "tab" } common.attrs.aria |= aria.tab + common.attrs.aria.role.tab |= aria.tab ## tablist aria.tablist = @@ -918,6 +991,8 @@ common.attrs.aria.implicit.listitem |= ) aria.role.tablist = attribute role { string "tablist" } + common.attrs.aria |= aria.tablist + common.attrs.aria.role.tablist |= aria.tablist ## tabpanel aria.tabpanel = @@ -928,6 +1003,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "tabpanel" } common.attrs.aria |= aria.tabpanel + common.attrs.aria.role.tabpanel |= aria.tabpanel ## textbox aria.textbox = @@ -940,6 +1016,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "textbox" } common.attrs.aria |= aria.textbox + common.attrs.aria.role.textbox |= aria.textbox ## timer aria.timer = @@ -962,6 +1039,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "toolbar" } common.attrs.aria |= aria.toolbar + common.attrs.aria.role.toolbar |= aria.toolbar ## tooltip aria.tooltip = @@ -984,6 +1062,7 @@ common.attrs.aria.implicit.listitem |= attribute role { string "tree" } common.attrs.aria |= aria.tree + common.attrs.aria.role.tree |= aria.tree ## treegrid aria.treegrid = @@ -1013,5 +1092,4 @@ common.attrs.aria.implicit.listitem |= attribute role { string "treeitem" } common.attrs.aria |= aria.treeitem - - + common.attrs.aria.role.treeitem |= aria.treeitem diff --git a/xml/relaxng/src/resources/html5-schema/block.rnc b/xml/relaxng/src/resources/html5-schema/block.rnc index 3f4332b23dc9..eeef41192014 100644 --- a/xml/relaxng/src/resources/html5-schema/block.rnc +++ b/xml/relaxng/src/resources/html5-schema/block.rnc @@ -25,7 +25,12 @@ datatypes w = "http://whattf.org/datatype-draft" hr.elem = element hr { hr.inner & hr.attrs } hr.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.separator + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) hr.inner = ( empty ) @@ -56,8 +61,17 @@ datatypes w = "http://whattf.org/datatype-draft" element ul { ul.inner & ul.attrs } ul.attrs = ( common.attrs - & ( common.attrs.aria - | common.attrs.aria.implicit.region + & ( ( common.attrs.aria.role.directory + | common.attrs.aria.role.list + | common.attrs.aria.role.listbox + | common.attrs.aria.role.menu + | common.attrs.aria.role.menubar + | common.attrs.aria.role.tablist + | common.attrs.aria.role.toolbar + | common.attrs.aria.role.tree + | common.attrs.aria.role.presentation + ) + | common.attrs.aria.implicit.region )? ) ul.inner = @@ -71,9 +85,7 @@ datatypes w = "http://whattf.org/datatype-draft" element li { li.inner & li.attrs } li.attrs = ( common.attrs - & ( common.attrs.aria - | common.attrs.aria.implicit.listitem - )? + & common.attrs.aria? ) li.inner = ( common.inner.flow ) @@ -87,8 +99,17 @@ datatypes w = "http://whattf.org/datatype-draft" & ol.attrs.start? & ol.attrs.reversed? & ol.attrs.type? - & ( common.attrs.aria - | common.attrs.aria.implicit.region + & ( ( common.attrs.aria.role.directory + | common.attrs.aria.role.list + | common.attrs.aria.role.listbox + | common.attrs.aria.role.menu + | common.attrs.aria.role.menubar + | common.attrs.aria.role.tablist + | common.attrs.aria.role.toolbar + | common.attrs.aria.role.tree + | common.attrs.aria.role.presentation + ) + | common.attrs.aria.implicit.region )? ) ol.attrs.start = @@ -115,9 +136,7 @@ datatypes w = "http://whattf.org/datatype-draft" oli.attrs = ( common.attrs & oli.attrs.value? - & ( common.attrs.aria - | common.attrs.aria.implicit.listitem - )? + & common.attrs.aria? ) oli.attrs.value = attribute value { @@ -154,7 +173,7 @@ datatypes w = "http://whattf.org/datatype-draft" & common.attrs.aria? ) dt.inner = - ( common.inner.phrasing ) + ( common.inner.flow ) ## Definition Description: <dd> @@ -183,9 +202,7 @@ datatypes w = "http://whattf.org/datatype-draft" & common.attrs.aria? ) div.inner = - ( style.elem.scoped* - , common.inner.flow - ) + ( common.inner.flow ) common.elem.flow |= div.elem @@ -195,7 +212,10 @@ datatypes w = "http://whattf.org/datatype-draft" element legend { legend.inner & legend.attrs } legend.attrs = ( common.attrs - & common.attrs.aria.implicit.region? + & ( common.attrs.aria.implicit.region + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) legend.inner = ( common.inner.phrasing ) diff --git a/xml/relaxng/src/resources/html5-schema/common-ext.rnc b/xml/relaxng/src/resources/html5-schema/common-ext.rnc new file mode 100644 index 000000000000..71a1e0be811a --- /dev/null +++ b/xml/relaxng/src/resources/html5-schema/common-ext.rnc @@ -0,0 +1,7 @@ +datatypes w = "http://whattf.org/datatype-draft" + +## content language + + common.data.string = + string +# w:content-language
\ No newline at end of file diff --git a/xml/relaxng/src/resources/html5-schema/common.rnc b/xml/relaxng/src/resources/html5-schema/common.rnc index c4f1eb9b0e0b..34d15fba1aa3 100644 --- a/xml/relaxng/src/resources/html5-schema/common.rnc +++ b/xml/relaxng/src/resources/html5-schema/common.rnc @@ -29,6 +29,9 @@ datatypes w = "http://whattf.org/datatype-draft" ## XML features that can't be serialized as HTML nonHTMLizable = empty +## features that are not part of the W3C HTML spec + nonW3C = empty + # ##################################################################### ## Wildcards # # ##################################################################### @@ -86,8 +89,15 @@ datatypes w = "http://whattf.org/datatype-draft" ## Prose Content + common.inner.transparent.flow = + ( text & common.elem.flow* ) + common.inner.flow = - ( text & common.elem.flow* ) # REVISIT <style scoped> + ( style.elem.scoped?, + ( text + & common.elem.flow* + ) + ) # ##################################################################### ## Common Attributes # @@ -110,7 +120,6 @@ common.attrs.basic = & common.attrs.title? & common.attrs.base? & common.attrs.space? - & common.attrs.role? ) common.attrs.id = attribute id { @@ -128,10 +137,6 @@ common.attrs.basic = attribute title { text } - common.attrs.role = - attribute role { - text - } common.attrs.base = common.attrs.xmlbase & nonRoundtrippable @@ -149,6 +154,7 @@ common.attrs.basic = common.attrs.i18n = ( common.attrs.dir? & common.attrs.language? + & common.attrs.translate? ) common.attrs.dir = attribute dir { @@ -181,6 +187,10 @@ common.attrs.i18n = # attribute xml:lang { # common.data.langcode # } & XMLonly + common.attrs.translate = + attribute translate { + w:string "yes" | w:string "no" + } common.attrs.present = ( common.attrs.style? @@ -233,7 +243,7 @@ common.attrs.other = common.data.idref = w:IDREF - + common.data.idrefs = w:IDREFS @@ -241,7 +251,7 @@ common.attrs.other = w:ID #FIXME common.data.hash-name = - w:hash-name + w:hash-name # xsd:string { # pattern = "#.+" # } @@ -265,12 +275,12 @@ common.attrs.other = # xsd:string { # pattern = "[0-9]+" # } - + # common.data.percent = # xsd:string { # pattern = "(100)|([1-9]?[0-9](\.[0-9]+)?)%" # } - + common.data.float = w:float # xsd:string { @@ -282,13 +292,13 @@ common.attrs.other = # xsd:string { # pattern = "(0*[1-9][0-9]*(\.[0-9]+)?)|([0-9]+(\.0*[1-9][0-9]*)?)([eE]-?[0-9]+)?" # } - + common.data.float.non-negative = w:float-non-negative # xsd:string { # pattern = "[0-9]+(\.[0-9]+)?([eE]-?[0-9]+)?" # } - + ## Temporal common.data.datetime = @@ -300,6 +310,9 @@ common.attrs.other = common.data.date = w:date + common.data.time-datetime = + w:time-datetime + ## IRIs common.data.uri = @@ -389,7 +402,7 @@ common.attrs.other = # ##################################################################### ## WF2 Module Hook # # ##################################################################### - + common-form.attrs.form = ( notAllowed ) # ##################################################################### @@ -397,6 +410,50 @@ common-form.attrs.form = ( notAllowed ) # ##################################################################### common.attrs.aria = ( notAllowed ) +common.attrs.aria.role.alert = ( notAllowed ) +common.attrs.aria.role.alertdialog = ( notAllowed ) +common.attrs.aria.role.application = ( notAllowed ) +common.attrs.aria.role.article = ( notAllowed ) +common.attrs.aria.role.banner = ( notAllowed ) +common.attrs.aria.role.button = ( notAllowed ) +common.attrs.aria.role.checkbox = ( notAllowed ) +common.attrs.aria.role.combobox = ( notAllowed ) +common.attrs.aria.role.complementary = ( notAllowed ) +common.attrs.aria.role.contentinfo = ( notAllowed ) +common.attrs.aria.role.dialog = ( notAllowed ) +common.attrs.aria.role.directory = ( notAllowed ) +common.attrs.aria.role.document = ( notAllowed ) +common.attrs.aria.role.heading = ( notAllowed ) +common.attrs.aria.role.img = ( notAllowed ) +common.attrs.aria.role.link = ( notAllowed ) +common.attrs.aria.role.list = ( notAllowed ) +common.attrs.aria.role.listitem = ( notAllowed ) +common.attrs.aria.role.log = ( notAllowed ) +common.attrs.aria.role.listbox = ( notAllowed ) +common.attrs.aria.role.main = ( notAllowed ) +common.attrs.aria.role.marquee = ( notAllowed ) +common.attrs.aria.role.menu = ( notAllowed ) +common.attrs.aria.role.menubar = ( notAllowed ) +common.attrs.aria.role.menuitem = ( notAllowed ) +common.attrs.aria.role.menuitemcheckbox = ( notAllowed ) +common.attrs.aria.role.menuitemradio = ( notAllowed ) +common.attrs.aria.role.note = ( notAllowed ) +common.attrs.aria.role.option = ( notAllowed ) +common.attrs.aria.role.presentation = ( notAllowed ) +common.attrs.aria.role.progressbar = ( notAllowed ) +common.attrs.aria.role.radio = ( notAllowed ) +common.attrs.aria.role.region = ( notAllowed ) +common.attrs.aria.role.search = ( notAllowed ) +common.attrs.aria.role.separator = ( notAllowed ) +common.attrs.aria.role.slider = ( notAllowed ) +common.attrs.aria.role.spinbutton = ( notAllowed ) +common.attrs.aria.role.status = ( notAllowed ) +common.attrs.aria.role.tab = ( notAllowed ) +common.attrs.aria.role.tablist = ( notAllowed ) +common.attrs.aria.role.textbox = ( notAllowed ) +common.attrs.aria.role.toolbar = ( notAllowed ) +common.attrs.aria.role.tree = ( notAllowed ) +common.attrs.aria.role.treeitem = ( notAllowed ) common.attrs.aria.implicit.button = ( notAllowed ) common.attrs.aria.implicit.input = ( notAllowed ) common.attrs.aria.implicit.region = ( notAllowed ) @@ -407,6 +464,7 @@ common.attrs.aria.implicit.link = ( notAllowed ) common.attrs.aria.implicit.listitem = ( notAllowed ) common.attrs.aria.implicit.img = ( notAllowed ) common.attrs.aria.implicit.select = ( notAllowed ) +common.attrs.aria.prop.readonly = ( notAllowed ) common.attrs.aria.landmark.application = ( notAllowed ) common.attrs.aria.landmark.banner = ( notAllowed ) common.attrs.aria.landmark.complementary = ( notAllowed ) @@ -417,4 +475,4 @@ common.attrs.aria.landmark.search = ( notAllowed ) # per ARIA spec: article, document, and note are not actually landmarks common.attrs.aria.landmark.article = ( notAllowed ) common.attrs.aria.landmark.document = ( notAllowed ) -common.attrs.aria.landmark.note = ( notAllowed )
\ No newline at end of file +common.attrs.aria.landmark.note = ( notAllowed ) diff --git a/xml/relaxng/src/resources/html5-schema/core-scripting-ext.rnc b/xml/relaxng/src/resources/html5-schema/core-scripting-ext.rnc new file mode 100644 index 000000000000..8ce82f5eeb3c --- /dev/null +++ b/xml/relaxng/src/resources/html5-schema/core-scripting-ext.rnc @@ -0,0 +1,3 @@ +datatypes w = "http://whattf.org/datatype-draft" + +noscript.inner.head |= meta.http-equiv.content-language.elem
\ No newline at end of file diff --git a/xml/relaxng/src/resources/html5-schema/core-scripting.rnc b/xml/relaxng/src/resources/html5-schema/core-scripting.rnc index ef21687e1832..bef6bf107423 100644 --- a/xml/relaxng/src/resources/html5-schema/core-scripting.rnc +++ b/xml/relaxng/src/resources/html5-schema/core-scripting.rnc @@ -15,6 +15,9 @@ datatypes w = "http://whattf.org/datatype-draft" ( common.attrs & script.attrs.type? & script.attrs.language? # restricted in Schematron + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) script.elem.imported = element script { script.inner.imported & script.attrs.imported } @@ -26,6 +29,9 @@ datatypes w = "http://whattf.org/datatype-draft" & script.attrs.type? & script.attrs.charset? & script.attrs.language? # restricted in Schematron + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) script.attrs.src = attribute src { @@ -86,7 +92,11 @@ datatypes w = "http://whattf.org/datatype-draft" noscript.inner.flow = ( common.inner.flow ) noscript.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) common.elem.metadata |= noscript.elem.head common.elem.phrasing |= noscript.elem.phrasing @@ -136,7 +146,6 @@ datatypes w = "http://whattf.org/datatype-draft" & scripting.attr.onplaying? & scripting.attr.onprogress? & scripting.attr.onratechange? - & scripting.attr.onreadystatechange? & scripting.attr.onreset? & scripting.attr.onscroll? & scripting.attr.onseeked? @@ -237,8 +246,6 @@ datatypes w = "http://whattf.org/datatype-draft" attribute onprogress { common.data.functionbody } scripting.attr.onratechange = attribute onratechange { common.data.functionbody } - scripting.attr.onreadystatechange = - attribute onreadystatechange { common.data.functionbody } scripting.attr.onreset = attribute onreset { common.data.functionbody } scripting.attr.onscroll = diff --git a/xml/relaxng/src/resources/html5-schema/data.rnc b/xml/relaxng/src/resources/html5-schema/data.rnc index 851b6cf2b2d4..e4c72de50742 100644 --- a/xml/relaxng/src/resources/html5-schema/data.rnc +++ b/xml/relaxng/src/resources/html5-schema/data.rnc @@ -10,19 +10,14 @@ datatypes w = "http://whattf.org/datatype-draft" element time { time.inner & time.attrs } time.attrs = ( common.attrs - & ( time.attrs.datetime? - | - ( - ( time.attrs.datetime.dateonly? - | time.attrs.datetime.tz? - ) - & time.attrs.pubdate - ) - ) + & time.attrs.datetime? + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) time.attrs.datetime = attribute datetime { - common.data.date-or-time #REVISIT check format + common.data.time-datetime } time.attrs.datetime.dateonly = attribute datetime { @@ -32,10 +27,6 @@ datatypes w = "http://whattf.org/datatype-draft" attribute datetime { common.data.datetime } - time.attrs.pubdate = - attribute pubdate { - w:string "pubdate" | w:string "" - } time.inner = ( common.inner.phrasing ) #Cannot enforce textContent format here @@ -53,6 +44,9 @@ datatypes w = "http://whattf.org/datatype-draft" & meter.attrs.high? & meter.attrs.max? & meter.attrs.optimum? + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) meter.attrs.value = attribute value { diff --git a/xml/relaxng/src/resources/html5-schema/embed.rnc b/xml/relaxng/src/resources/html5-schema/embed.rnc index 27c9856ecdd3..014ac5bb61d2 100644 --- a/xml/relaxng/src/resources/html5-schema/embed.rnc +++ b/xml/relaxng/src/resources/html5-schema/embed.rnc @@ -15,12 +15,12 @@ namespace local = "" img.attrs = ( common.attrs & img.attrs.src - & img.attrs.alt? + & img.attrs.alt? # ARIA: if alt empty, only allowed role value is "presentation"; check in assertions & img.attrs.height? & img.attrs.width? & img.attrs.usemap? & img.attrs.ismap? - & img.attrs.border? # obsolete + & img.attrs.border? # obsolete & common.attrs.aria? ) img.attrs.src = @@ -67,6 +67,10 @@ namespace local = "" & embed.attrs.height? & embed.attrs.width? & embed.attrs.other* + & ( common.attrs.aria.landmark.application + | common.attrs.aria.landmark.document + | common.attrs.aria.role.img + )? ) embed.attrs.src = attribute src { @@ -94,6 +98,7 @@ namespace local = "" | title | dir | lang + | translate | style | tabindex | contextmenu @@ -141,7 +146,6 @@ namespace local = "" | onplaying | onprogress | onratechange - | onreadystatechange | onreset | onscroll | onseeked @@ -174,6 +178,7 @@ namespace local = "" | aria-describedby | aria-disabled | aria-dropeffect + | aria-expanded | aria-flowto | aria-grabbed | aria-haspopup @@ -184,7 +189,7 @@ namespace local = "" | aria-live | aria-owns | aria-relevant - | aria-required + | aria-required | spellcheck | accesskey | itemref @@ -194,6 +199,64 @@ namespace local = "" | itemid | name | align + | about + | prefix + | property + | typeof + | vocab + | content + | datatype + | href + | rel + | resource + | rev + | inlist + | its-loc-note + | its-loc-note-type + | its-loc-note-ref + | its-term-info-ref + | its-term + | its-term-confidence + | its-within-text + | its-domain-mapping + | its-disambig-granularity + | its-disambig-confidence + | its-disambig-class-ref + | its-disambig-ident + | its-disambig-ident-ref + | its-disambig-source + | its-locale-filter-list + | its-person + | its-person-ref + | its-org + | its-org-ref + | its-tool + | its-tool-ref + | its-rev-person + | its-rev-person-ref + | its-rev-org + | its-rev-org-ref + | its-rev-tool + | its-rev-tool-ref + | its-prov-ref + | its-provenance-records-ref + | its-loc-quality-issues-ref + | its-loc-quality-issue-type + | its-loc-quality-issue-comment + | its-loc-quality-issue-severity + | its-loc-quality-issue-profile-ref + | its-loc-quality-issue-enabled + | its-loc-quality-rating-score + | its-loc-quality-rating-vote + | its-loc-quality-rating-score-threshold + | its-loc-quality-rating-vote-threshold + | its-loc-quality-rating-profile-ref + | its-mt-confidence + | its-allowed-characters + | its-storage-size + | its-storage-encoding + | its-line-break-type + | its-annotators-ref ) { string @@ -224,7 +287,11 @@ namespace local = "" & object.attrs.usemap? & object.attrs.name? & common-form.attrs.form? - & common.attrs.aria? + & ( common.attrs.aria.implicit.region + | common.attrs.aria.landmark.application + | common.attrs.aria.landmark.document + | common.attrs.aria.role.img + )? ) object.attrs.data = attribute data { @@ -252,7 +319,7 @@ namespace local = "" } object.inner.flow = ( param.elem* - , common.inner.flow + , common.inner.transparent.flow ) object.inner.phrasing = ( param.elem* @@ -270,6 +337,9 @@ namespace local = "" ( common.attrs & param.attrs.name & param.attrs.value + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) param.attrs.name = attribute name { @@ -295,8 +365,11 @@ namespace local = "" & iframe.attrs.height? & iframe.attrs.sandbox? & iframe.attrs.seamless? - & ( common.attrs.aria - | common.attrs.aria.implicit.region + & iframe.attrs.allowfullscreen? + & ( common.attrs.aria.implicit.region + | common.attrs.aria.landmark.application + | common.attrs.aria.landmark.document + | common.attrs.aria.role.img )? ) iframe.attrs.src = @@ -470,6 +543,10 @@ namespace local = "" , ( w:string "allow-top-navigation" )? } } & v5only + iframe.attrs.allowfullscreen = + attribute allowfullscreen { + w:string "allowfullscreen" | w:string "" + } & v5only iframe.inner = ( text ) @@ -487,13 +564,16 @@ namespace local = "" map.attrs = ( common.attrs & map.attrs.name + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) # REVISIT make id required in Schematron map.attrs.name = attribute name { common.data.name } map.inner.flow = - ( common.inner.flow ) + ( common.inner.transparent.flow ) map.inner.phrasing = ( common.inner.phrasing ) @@ -505,7 +585,10 @@ namespace local = "" area.elem = element area { area.inner & area.attrs } area.attrs = - ( common.attrs + ( common.attrs.basic + & common.attrs.i18n + & common.attrs.present + & common.attrs.other & ( area.attrs.alt & shared-hyperlink.attrs.href )? @@ -516,6 +599,10 @@ namespace local = "" & shared-hyperlink.attrs.hreflang? & shared-hyperlink.attrs.type? & area.attrs.shape? + & ( common.attrs.aria.role.link + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) area.attrs.alt = attribute alt { diff --git a/xml/relaxng/src/resources/html5-schema/html5.rnc b/xml/relaxng/src/resources/html5-schema/html5.rnc index a653b02db511..4d0a71a75a46 100644 --- a/xml/relaxng/src/resources/html5-schema/html5.rnc +++ b/xml/relaxng/src/resources/html5-schema/html5.rnc @@ -1,4 +1,4 @@ -default namespace = "http://www.w3.org/1999/html" +default namespace = "http://www.w3.org/1999/xhtml" # ##################################################################### ## RELAX NG Schema for HTML 5 # # ##################################################################### @@ -33,12 +33,15 @@ include "common.rnc" { nonRoundtrippable = notAllowed } +include "common-ext.rnc" + # ##################################################################### ## Language Definitions start = html.elem include "meta.rnc" +include "meta-ext.rnc" include "phrase.rnc" include "block.rnc" include "sectional.rnc" @@ -48,6 +51,7 @@ include "embed.rnc" include "ruby.rnc" include "media.rnc" include "core-scripting.rnc" +include "core-scripting-ext.rnc" include "tables.rnc" include "form-datatypes.rnc" include "web-forms.rnc" diff --git a/xml/relaxng/src/resources/html5-schema/media.rnc b/xml/relaxng/src/resources/html5-schema/media.rnc index edc5744bac32..04072ecc1036 100644 --- a/xml/relaxng/src/resources/html5-schema/media.rnc +++ b/xml/relaxng/src/resources/html5-schema/media.rnc @@ -49,6 +49,9 @@ datatypes w = "http://whattf.org/datatype-draft" & source.attrs.src & source.attrs.type? & source.attrs.media? + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) source.attrs.src = attribute src { @@ -65,7 +68,12 @@ datatypes w = "http://whattf.org/datatype-draft" source.inner = ( empty ) -## Media src attribute +## Media Source + + media.source = + ( media.attrs.src + | source.elem* + ) media.attrs.src = attribute src { @@ -84,6 +92,7 @@ datatypes w = "http://whattf.org/datatype-draft" & video.attrs.poster? & video.attrs.height? & video.attrs.width? + & common.attrs.aria.landmark.application? ) video.attrs.poster = attribute poster { @@ -98,19 +107,15 @@ datatypes w = "http://whattf.org/datatype-draft" common.data.integer.non-negative } video.inner.flow = - ( video.source + ( media.source , track.elem* - , common.inner.flow + , common.inner.transparent.flow ) video.inner.phrasing = - ( video.source + ( media.source , track.elem* , common.inner.phrasing ) - video.source = - ( media.attrs.src - | source.elem* - ) common.elem.flow |= video.elem.flow common.elem.phrasing |= video.elem.phrasing @@ -124,21 +129,18 @@ datatypes w = "http://whattf.org/datatype-draft" audio.attrs = ( common.attrs & media.attrs + & common.attrs.aria.landmark.application? ) audio.inner.flow = - ( audio.source + ( media.source , track.elem* - , common.inner.flow + , common.inner.transparent.flow ) audio.inner.phrasing = - ( audio.source + ( media.source , track.elem* , common.inner.phrasing ) - audio.source = - ( media.attrs.src - | source.elem+ - ) common.elem.flow |= audio.elem.flow common.elem.phrasing |= audio.elem.phrasing @@ -155,6 +157,9 @@ datatypes w = "http://whattf.org/datatype-draft" & track.attrs.srclang? & track.attrs.label? & track.attrs.default? + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) track.attrs.kind = attribute kind { @@ -186,10 +191,10 @@ datatypes w = "http://whattf.org/datatype-draft" element figure { figure.inner & figure.attrs } figure.attrs = ( common.attrs - & common.attrs.aria.implicit.img? + & common.attrs.aria? ) figure.inner = - ( ( figcaption.elem, common.inner.flow ) + ( ( figcaption.elem?, common.inner.flow ) | ( common.inner.flow, figcaption.elem? ) ) @@ -200,6 +205,10 @@ datatypes w = "http://whattf.org/datatype-draft" figcaption.elem = element figcaption { figcaption.inner & figcaption.attrs } figcaption.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) figcaption.inner = ( common.inner.flow ) diff --git a/xml/relaxng/src/resources/html5-schema/meta-ext.rnc b/xml/relaxng/src/resources/html5-schema/meta-ext.rnc new file mode 100644 index 000000000000..b8c2b6793885 --- /dev/null +++ b/xml/relaxng/src/resources/html5-schema/meta-ext.rnc @@ -0,0 +1,57 @@ +datatypes w = "http://whattf.org/datatype-draft" + +## "Content-Language" pragma directive: <meta http-equiv='Content-Language'> + + meta.http-equiv.content-language.elem = + element meta { meta.inner & meta.http-equiv.content-language.attrs } + meta.http-equiv.content-language.attrs = + ( common.attrs.basic + & common.attrs.i18n + & common.attrs.present + & common.attrs.other + & meta.http-equiv.attrs.http-equiv.content-language + & meta.http-equiv.attrs.content.content-language + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) + meta.http-equiv.attrs.http-equiv.content-language = + attribute http-equiv { + w:string "content-language" + } + meta.http-equiv.attrs.content.content-language = + attribute content { + common.data.string + } + + common.elem.metadata |= meta.http-equiv.content-language.elem # not quite right per spec + # if the definition is + # reused in another language + +## "X-UA-Compatible" pragma directive: <meta http-equiv='X-UA-Compatible'> + + meta.http-equiv.x-ua-compatible.elem = + element meta { meta.inner & meta.http-equiv.x-ua-compatible.attrs } + meta.http-equiv.x-ua-compatible.attrs = + ( common.attrs.basic + & common.attrs.i18n + & common.attrs.present + & common.attrs.other + & meta.http-equiv.attrs.http-equiv.x-ua-compatible + & meta.http-equiv.attrs.content.x-ua-compatible + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) + meta.http-equiv.attrs.http-equiv.x-ua-compatible = + attribute http-equiv { + w:string "x-ua-compatible" + } + meta.http-equiv.attrs.content.x-ua-compatible = + attribute content { + common.data.string + } + + common.elem.metadata |= meta.http-equiv.x-ua-compatible.elem # not quite right per spec + # if the definition is + # reused in another language
\ No newline at end of file diff --git a/xml/relaxng/src/resources/html5-schema/meta.rnc b/xml/relaxng/src/resources/html5-schema/meta.rnc index cd0097a81955..45c7f259237a 100644 --- a/xml/relaxng/src/resources/html5-schema/meta.rnc +++ b/xml/relaxng/src/resources/html5-schema/meta.rnc @@ -9,7 +9,11 @@ datatypes w = "http://whattf.org/datatype-draft" html.elem = element html { html.inner & html.attrs } html.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) html.inner = ( head.elem , body.elem @@ -22,6 +26,9 @@ datatypes w = "http://whattf.org/datatype-draft" head.attrs = ( common.attrs # & head.attrs.profile? + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) # head.attrs.profile = # attribute profile { @@ -49,6 +56,7 @@ datatypes w = "http://whattf.org/datatype-draft" & ( common.attrs.aria.landmark.application | common.attrs.aria.landmark.document | common.attrs.aria.implicit.structure + | common.attrs.aria.role.presentation )? & body.attrs.onafterprint? & body.attrs.onbeforeprint? @@ -57,11 +65,11 @@ datatypes w = "http://whattf.org/datatype-draft" & body.attrs.onmessage? & body.attrs.onoffline? & body.attrs.ononline? + & body.attrs.onpagehide? + & body.attrs.onpageshow? & body.attrs.onpopstate? - & body.attrs.onredo? & body.attrs.onresize? & body.attrs.onstorage? - & body.attrs.onundo? & body.attrs.onunload? ) body.inner = @@ -83,6 +91,10 @@ datatypes w = "http://whattf.org/datatype-draft" attribute ononline { common.data.functionbody } body.attrs.onpopstate = attribute onpopstate { common.data.functionbody } + body.attrs.onpagehide = + attribute onpagehide { common.data.functionbody } + body.attrs.onpageshow = + attribute onpageshow { common.data.functionbody } body.attrs.onredo = attribute onredo { common.data.functionbody } body.attrs.onresize = @@ -99,7 +111,11 @@ datatypes w = "http://whattf.org/datatype-draft" title.elem = element title { title.inner & title.attrs } title.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) title.inner = ( text ) @@ -108,12 +124,18 @@ datatypes w = "http://whattf.org/datatype-draft" base.elem = element base { base.inner & base.attrs } base.attrs = - ( common.attrs + ( common.attrs.basic + & common.attrs.i18n + & common.attrs.present + & common.attrs.other & ( ( base.attrs.href & base.attrs.target? ) | base.attrs.target ) + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) base.attrs.href = attribute href { @@ -135,19 +157,17 @@ datatypes w = "http://whattf.org/datatype-draft" & common.attrs.i18n & common.attrs.present & common.attrs.other - & common.attrs.microdata.itemref? - & common.attrs.microdata.itemscope? - & common.attrs.microdata.itemtype? - & common.attrs.microdata.itemid? & link.attrs.href - & ( link.attrs.rel - | common.attrs.microdata.itemprop - ) + & link.attrs.rel & shared-hyperlink.attrs.hreflang? & shared-hyperlink.attrs.media? & shared-hyperlink.attrs.type? & link.attrs.sizes? # link.attrs.title included in common.attrs + & ( common.attrs.aria.role.link + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) link.attrs.href = attribute href { @@ -175,6 +195,9 @@ datatypes w = "http://whattf.org/datatype-draft" & style.attrs.type? & style.attrs.media? # style.attrs.title included in common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) style.attrs.type = attribute type { @@ -199,6 +222,9 @@ datatypes w = "http://whattf.org/datatype-draft" & style.attrs.media? & style.attrs.scoped # style.attrs.title included in common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) style.attrs.scoped = attribute scoped { @@ -216,6 +242,9 @@ datatypes w = "http://whattf.org/datatype-draft" & common.attrs.other & meta.name.attrs.name & meta.name.attrs.content + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) meta.name.attrs.name = attribute name { @@ -241,6 +270,9 @@ datatypes w = "http://whattf.org/datatype-draft" & common.attrs.other & meta.http-equiv.attrs.http-equiv.refresh & meta.http-equiv.attrs.content.refresh + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) meta.http-equiv.attrs.http-equiv.refresh = attribute http-equiv { @@ -265,6 +297,9 @@ datatypes w = "http://whattf.org/datatype-draft" & common.attrs.other & meta.http-equiv.attrs.http-equiv.default-style & meta.http-equiv.attrs.content.default-style + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) meta.http-equiv.attrs.http-equiv.default-style = attribute http-equiv { @@ -289,6 +324,9 @@ datatypes w = "http://whattf.org/datatype-draft" & common.attrs.present & common.attrs.other & meta.charset.attrs.charset + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) meta.charset.attrs.charset = attribute charset { @@ -310,6 +348,9 @@ datatypes w = "http://whattf.org/datatype-draft" & common.attrs.other & meta.http-equiv.attrs.http-equiv.content-type & meta.http-equiv.attrs.content.content-type + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) meta.http-equiv.attrs.http-equiv.content-type = attribute http-equiv { diff --git a/xml/relaxng/src/resources/html5-schema/microdata.rnc b/xml/relaxng/src/resources/html5-schema/microdata.rnc index 51d25ae3705c..076a4ded1dad 100644 --- a/xml/relaxng/src/resources/html5-schema/microdata.rnc +++ b/xml/relaxng/src/resources/html5-schema/microdata.rnc @@ -34,6 +34,10 @@ common.attrs.microdata = common.attrs &= common.attrs.microdata +a.attrs &= common.attrs.microdata +area.attrs &= common.attrs.microdata +base.attrs &= common.attrs.microdata + ## URL-valued Property Metadata: <link itemprop> link.elem.phrasing = @@ -54,9 +58,21 @@ common.attrs &= common.attrs.microdata & shared-hyperlink.attrs.type? & link.attrs.sizes? # link.attrs.title included in common.attrs + & ( common.attrs.aria.role.link + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) common.elem.phrasing |= link.elem.phrasing +## <link> element in head, extensions + +link.attrs.rel |= common.attrs.microdata.itemprop +link.attrs &= common.attrs.microdata.itemref? +link.attrs &= common.attrs.microdata.itemscope? +link.attrs &= common.attrs.microdata.itemtype? +link.attrs &= common.attrs.microdata.itemid? + ## Property Metadata: <meta itemprop> meta.itemprop.elem = @@ -72,6 +88,9 @@ common.attrs &= common.attrs.microdata & common.attrs.microdata.itemtype? & common.attrs.microdata.itemid? & meta.itemprop.attrs.content + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) meta.itemprop.attrs.content = attribute content { diff --git a/xml/relaxng/src/resources/html5-schema/phrase.rnc b/xml/relaxng/src/resources/html5-schema/phrase.rnc index 91ee130e50c3..cf6ed580f1ca 100644 --- a/xml/relaxng/src/resources/html5-schema/phrase.rnc +++ b/xml/relaxng/src/resources/html5-schema/phrase.rnc @@ -11,8 +11,11 @@ datatypes w = "http://whattf.org/datatype-draft" a.elem.flow = element a { a.inner.flow & a.attrs } a.attrs = - ( common.attrs - & a.attrs.name? + ( common.attrs.basic + & common.attrs.i18n + & common.attrs.present + & common.attrs.other + & a.attrs.name? & shared-hyperlink.attrs.href? & shared-hyperlink.attrs.target? & shared-hyperlink.attrs.rel? @@ -20,8 +23,16 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-hyperlink.attrs.media? & shared-hyperlink.attrs.type? & shared-hyperlink.attrs.ping? - & ( common.attrs.aria - | common.attrs.aria.implicit.link + & ( ( common.attrs.aria.role.button + | common.attrs.aria.role.checkbox + | common.attrs.aria.role.link + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.menuitemcheckbox + | common.attrs.aria.role.menuitemradio + | common.attrs.aria.role.tab + | common.attrs.aria.role.treeitem + ) + | common.attrs.aria.implicit.link )? ) a.attrs.name = @@ -31,7 +42,7 @@ datatypes w = "http://whattf.org/datatype-draft" a.inner.phrasing = ( common.inner.phrasing ) a.inner.flow = - ( common.inner.flow ) + ( common.inner.transparent.flow ) common.elem.phrasing |= a.elem.phrasing common.elem.flow |= a.elem.flow @@ -65,7 +76,7 @@ datatypes w = "http://whattf.org/datatype-draft" shared-hyperlink.attrs.ping = attribute ping { common.data.uris - } & v5only + } & v5only & nonW3C ## Emphatic Stress: <em> @@ -112,7 +123,11 @@ datatypes w = "http://whattf.org/datatype-draft" element mark { mark.inner & mark.attrs } & v5only mark.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) mark.inner = ( common.inner.phrasing ) @@ -255,7 +270,11 @@ datatypes w = "http://whattf.org/datatype-draft" sup.elem = element sup { sup.inner & sup.attrs } sup.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) sup.inner = ( common.inner.phrasing ) @@ -266,7 +285,11 @@ datatypes w = "http://whattf.org/datatype-draft" sub.elem = element sub { sub.inner & sub.attrs } sub.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) sub.inner = ( common.inner.phrasing ) @@ -321,7 +344,11 @@ datatypes w = "http://whattf.org/datatype-draft" bdo.elem = element bdo { bdo.inner & bdo.attrs } bdo.attrs = - ( common.attrs ) # dir required in Schematron + ( common.attrs # dir required in Schematron + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) bdo.inner = ( common.inner.phrasing ) @@ -332,7 +359,11 @@ datatypes w = "http://whattf.org/datatype-draft" bdi.elem = element bdi { bdi.inner & bdi.attrs } bdi.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) bdi.inner = ( common.inner.phrasing ) @@ -343,7 +374,11 @@ datatypes w = "http://whattf.org/datatype-draft" br.elem = element br { br.inner & br.attrs } br.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) br.inner = ( empty ) @@ -354,7 +389,11 @@ datatypes w = "http://whattf.org/datatype-draft" wbr.elem = element wbr { wbr.inner & wbr.attrs } wbr.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) wbr.inner = ( empty ) diff --git a/xml/relaxng/src/resources/html5-schema/rdfa.rnc b/xml/relaxng/src/resources/html5-schema/rdfa.rnc new file mode 100644 index 000000000000..638c9104d29b --- /dev/null +++ b/xml/relaxng/src/resources/html5-schema/rdfa.rnc @@ -0,0 +1,240 @@ +# ##################################################################### +## RELAX NG Schema for HTML 5: RDFa 1.1 and RDFa Lite 1.1 # +# ##################################################################### + +# ##################################################################### +## RDFa Datatypes # +# ##################################################################### + +common.data.rdfa.safecurie = + xsd:string { + pattern = "\[(([\i-[:]][\c-[:]]*)?:)?[^\s]+\]" + minLength = "3" + } +common.data.rdfa.curie = + xsd:string { + pattern = "(([\i-[:]][\c-[:]]*)?:)?[^\s]+" + minLength = "1" + } +common.data.rdfa.term = + xsd:string { + pattern = "[\i-[:]][/\c-[:]]*" + } + +# ##################################################################### +## RDFa Attributes # +# ##################################################################### + +common.attrs.rdfa &= + ( common.attrs.rdfa.about? + & common.attrs.rdfa.prefix? + & common.attrs.rdfa.property? + & common.attrs.rdfa.typeof? + & common.attrs.rdfa.vocab? + & common.attrs.rdfa.content? + & common.attrs.rdfa.datatype? + & common.attrs.rdfa.rel? + & common.attrs.rdfa.resource? + & common.attrs.rdfa.rev? + & common.attrs.rdfa.inlist? + ) + common.attrs.rdfa.prefix = + attribute prefix { + ( + xsd:string { + pattern = "([\i-[:]][\c-[:]]*: [^ ]+)(\s+[\i-[:]][\c-[:]]*: [^ ]+)*" + } + | string "" + ) + } + common.attrs.rdfa.property = + attribute property { + ( + list { + ( common.data.rdfa.term + | common.data.rdfa.curie + | common.data.uri.absolute + )+ + } + | string "" + ) + } + common.attrs.rdfa.resource = + attribute resource { + ( common.data.rdfa.safecurie + | common.data.rdfa.curie + | common.data.uri + ) + } + common.attrs.rdfa.typeof = + attribute typeof { + ( + list { + ( common.data.rdfa.term + | common.data.rdfa.curie + | common.data.uri.absolute + )+ + } + | string "" + ) + } + common.attrs.rdfa.vocab = + attribute vocab { + ( common.data.uri.absolute + | string "" + ) + } + common.attrs.rdfa.about = + attribute about { + ( common.data.rdfa.safecurie + | common.data.rdfa.curie + | common.data.uri + ) + } & nonRDFaLite + common.attrs.rdfa.content = + attribute content { + string + } & nonRDFaLite + common.attrs.rdfa.datatype = + attribute datatype { + ( common.data.rdfa.term + | common.data.rdfa.curie + | common.data.uri.absolute + | string "" + ) + } & nonRDFaLite + common.attrs.rdfa.rel = + attribute rel { + ( + list { + ( common.data.rdfa.term + | common.data.rdfa.curie + | common.data.uri.absolute + )+ + } + | string "" + ) + } & nonRDFaLite + common.attrs.rdfa.rev = + attribute rev { + ( + list { + ( common.data.rdfa.term + | common.data.rdfa.curie + | common.data.uri.absolute + )+ + } + | string "" + ) + } & nonRDFaLite + common.attrs.rdfa.inlist = + attribute inlist { + string + } & nonRDFaLite + +common.attrs.rdfa.no-rel &= + ( common.attrs.rdfa.about? + & common.attrs.rdfa.prefix? + & common.attrs.rdfa.property? + & common.attrs.rdfa.typeof? + & common.attrs.rdfa.vocab? + & common.attrs.rdfa.content? + & common.attrs.rdfa.datatype? + & common.attrs.rdfa.resource? + & common.attrs.rdfa.rev? + & common.attrs.rdfa.inlist? + ) +common.attrs.rdfa.no-rel-rev &= + ( common.attrs.rdfa.about? + & common.attrs.rdfa.prefix? + & common.attrs.rdfa.property? + & common.attrs.rdfa.typeof? + & common.attrs.rdfa.vocab? + & common.attrs.rdfa.content? + & common.attrs.rdfa.datatype? + & common.attrs.rdfa.resource? + & common.attrs.rdfa.inlist? + ) +common.attrs.rdfa.no-content-noproperty &= + ( common.attrs.rdfa.about? + & common.attrs.rdfa.prefix? + & common.attrs.rdfa.typeof? + & common.attrs.rdfa.vocab? + & common.attrs.rdfa.datatype? + & common.attrs.rdfa.resource? + & common.attrs.rdfa.inlist? + ) + +common.attrs &= common.attrs.rdfa + +a.attrs &= common.attrs.rdfa.no-rel-rev +area.attrs &= common.attrs.rdfa.no-rel +base.attrs &= common.attrs.rdfa.no-rel + +link.rdfa.elem.metadata = + element link { link.inner & link.rdfa.attrs.metadata } +link.rdfa.elem.phrasing = + element link { link.inner & link.rdfa.attrs.phrasing } +link.rdfa.attrs.metadata = + ( common.attrs.basic + & common.attrs.i18n + & common.attrs.present + & common.attrs.other + & ( ( common.attrs.rdfa.property + & ( link.attrs.rel + | common.attrs.rdfa.rel + )? + ) + | + ( common.attrs.rdfa.property? + & ( link.attrs.rel + | common.attrs.rdfa.rel + ) + ) + ) + & link.attrs.href + & common.attrs.rdfa.about? + & common.attrs.rdfa.prefix? + & common.attrs.rdfa.typeof? + & common.attrs.rdfa.vocab? + & common.attrs.rdfa.content? + & common.attrs.rdfa.datatype? + & common.attrs.rdfa.resource? + & common.attrs.rdfa.rev? + & common.attrs.rdfa.inlist? + & shared-hyperlink.attrs.hreflang? + & shared-hyperlink.attrs.media? + & shared-hyperlink.attrs.type? + & link.attrs.sizes? + # link.attrs.title included in common.attrs + ) +link.rdfa.attrs.phrasing = + ( common.attrs.basic + & common.attrs.i18n + & common.attrs.present + & common.attrs.other + & common.attrs.rdfa.property + & ( link.attrs.rel + | common.attrs.rdfa.rel + )? + & link.attrs.href + & common.attrs.rdfa.about? + & common.attrs.rdfa.prefix? + & common.attrs.rdfa.typeof? + & common.attrs.rdfa.vocab? + & common.attrs.rdfa.content? + & common.attrs.rdfa.datatype? + & common.attrs.rdfa.resource? + & common.attrs.rdfa.rev? + & common.attrs.rdfa.inlist? + & shared-hyperlink.attrs.hreflang? + & shared-hyperlink.attrs.media? + & shared-hyperlink.attrs.type? + & link.attrs.sizes? + # link.attrs.title included in common.attrs + ) + common.elem.metadata |= link.rdfa.elem.metadata + common.elem.phrasing |= link.rdfa.elem.phrasing + +meta.name.attrs.name |= common.attrs.rdfa.property +meta.name.attrs &= common.attrs.rdfa.no-content-noproperty diff --git a/xml/relaxng/src/resources/html5-schema/revision.rnc b/xml/relaxng/src/resources/html5-schema/revision.rnc index b46fe2c11a19..4f518eecb875 100644 --- a/xml/relaxng/src/resources/html5-schema/revision.rnc +++ b/xml/relaxng/src/resources/html5-schema/revision.rnc @@ -23,9 +23,12 @@ ( common.attrs & edit.attrs.cite? & edit.attrs.datetime? + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) ins.inner.flow = - ( common.inner.flow ) + ( common.inner.transparent.flow ) ins.inner.phrasing = ( common.inner.phrasing ) @@ -42,9 +45,12 @@ ( common.attrs & edit.attrs.cite? & edit.attrs.datetime? + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) del.inner.flow = - ( common.inner.flow ) + ( common.inner.transparent.flow ) del.inner.phrasing = ( common.inner.phrasing ) diff --git a/xml/relaxng/src/resources/html5-schema/sectional.rnc b/xml/relaxng/src/resources/html5-schema/sectional.rnc index f7931bc2ab71..96af56b341c3 100644 --- a/xml/relaxng/src/resources/html5-schema/sectional.rnc +++ b/xml/relaxng/src/resources/html5-schema/sectional.rnc @@ -11,7 +11,11 @@ element h1 { h1.inner & h1.attrs } h1.attrs = ( common.attrs - & common.attrs.aria.implicit.structure? + & ( common.attrs.aria.implicit.structure + | common.attrs.aria.role.heading + | common.attrs.aria.role.tab + | common.attrs.aria.role.presentation + )? ) h1.inner = ( common.inner.phrasing ) @@ -24,7 +28,11 @@ element h2 { h2.inner & h2.attrs } h2.attrs = ( common.attrs - & common.attrs.aria.implicit.structure? + & ( common.attrs.aria.implicit.structure + | common.attrs.aria.role.heading + | common.attrs.aria.role.tab + | common.attrs.aria.role.presentation + )? ) h2.inner = ( common.inner.phrasing ) @@ -37,7 +45,11 @@ element h3 { h3.inner & h3.attrs } h3.attrs = ( common.attrs - & common.attrs.aria.implicit.structure? + & ( common.attrs.aria.implicit.structure + | common.attrs.aria.role.heading + | common.attrs.aria.role.tab + | common.attrs.aria.role.presentation + )? ) h3.inner = ( common.inner.phrasing ) @@ -50,7 +62,11 @@ element h4 { h4.inner & h4.attrs } h4.attrs = ( common.attrs - & common.attrs.aria.implicit.structure? + & ( common.attrs.aria.implicit.structure + | common.attrs.aria.role.heading + | common.attrs.aria.role.tab + | common.attrs.aria.role.presentation + )? ) h4.inner = ( common.inner.phrasing ) @@ -63,7 +79,11 @@ element h5 { h5.inner & h5.attrs } h5.attrs = ( common.attrs - & common.attrs.aria.implicit.structure? + & ( common.attrs.aria.implicit.structure + | common.attrs.aria.role.heading + | common.attrs.aria.role.tab + | common.attrs.aria.role.presentation + )? ) h5.inner = ( common.inner.phrasing ) @@ -76,7 +96,11 @@ element h6 { h6.inner & h6.attrs } h6.attrs = ( common.attrs - & common.attrs.aria.implicit.structure? + & ( common.attrs.aria.implicit.structure + | common.attrs.aria.role.heading + | common.attrs.aria.role.tab + | common.attrs.aria.role.presentation + )? ) h6.inner = ( common.inner.phrasing ) @@ -89,7 +113,11 @@ element hgroup { hgroup.inner & hgroup.attrs } hgroup.attrs = ( common.attrs - & common.attrs.aria.implicit.structure? + & ( common.attrs.aria.implicit.structure # not implementing "aria-level property set to the element's outline depth", nor heading role; see http://hsivonen.iki.fi/aria-html5-bis/ + | common.attrs.aria.role.heading + | common.attrs.aria.role.tab + | common.attrs.aria.role.presentation + )? ) hgroup.inner = ( h1.elem @@ -111,7 +139,10 @@ element address { address.inner & address.attrs } address.attrs = ( common.attrs - & common.attrs.aria.implicit.region? + & ( common.attrs.aria.implicit.region + | common.attrs.aria.role.contentinfo + | common.attrs.aria.role.presentation + )? ) address.inner = ( common.inner.flow ) diff --git a/xml/relaxng/src/resources/html5-schema/structural.rnc b/xml/relaxng/src/resources/html5-schema/structural.rnc index f79fcadeaf75..284f59964b88 100644 --- a/xml/relaxng/src/resources/html5-schema/structural.rnc +++ b/xml/relaxng/src/resources/html5-schema/structural.rnc @@ -8,14 +8,24 @@ element section { section.inner & section.attrs } section.attrs = ( common.attrs - & ( common.attrs.aria - | common.attrs.aria.implicit.region + & ( common.attrs.aria.implicit.region + | common.attrs.aria.role.alert + | common.attrs.aria.role.alertdialog + | common.attrs.aria.role.contentinfo + | common.attrs.aria.role.dialog + | common.attrs.aria.role.log + | common.attrs.aria.role.main + | common.attrs.aria.role.marquee + | common.attrs.aria.role.region + | common.attrs.aria.role.status + | common.attrs.aria.role.presentation + | common.attrs.aria.landmark.application + | common.attrs.aria.landmark.document + | common.attrs.aria.landmark.search )? ) section.inner = - ( style.elem.scoped* - , common.inner.flow - ) + ( common.inner.flow ) common.elem.flow |= section.elem @@ -25,9 +35,11 @@ element nav { nav.inner & nav.attrs } nav.attrs = ( common.attrs - & ( common.attrs.aria.implicit.region - | common.attrs.aria.landmark.navigation - )? + & ( common.attrs.aria.implicit.region + | common.attrs.aria.landmark.navigation + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.presentation + )? ) nav.inner = ( common.inner.flow ) @@ -40,12 +52,13 @@ element article { article.inner & article.attrs } article.attrs = ( common.attrs - & ( common.attrs.aria.implicit.region - | common.attrs.aria.landmark.article - | common.attrs.aria.landmark.main - | common.attrs.aria.landmark.document - | common.attrs.aria.landmark.application - )? + & ( common.attrs.aria.implicit.region + | common.attrs.aria.landmark.article + | common.attrs.aria.landmark.document + | common.attrs.aria.landmark.application + | common.attrs.aria.landmark.main + | common.attrs.aria.role.presentation + )? ) article.inner = ( style.elem* @@ -60,11 +73,12 @@ element aside { aside.inner & aside.attrs } aside.attrs = ( common.attrs - & ( common.attrs.aria.implicit.region - | common.attrs.aria.landmark.complementary - | common.attrs.aria.landmark.search - | common.attrs.aria.landmark.note - )? + & ( common.attrs.aria.implicit.region + | common.attrs.aria.landmark.note + | common.attrs.aria.landmark.complementary + | common.attrs.aria.landmark.search + | common.attrs.aria.role.presentation + )? ) aside.inner = ( style.elem* @@ -79,9 +93,10 @@ element header { header.inner & header.attrs } header.attrs = ( common.attrs - & ( common.attrs.aria.implicit.region - | common.attrs.aria.landmark.banner - )? + & ( common.attrs.aria.implicit.region + | common.attrs.aria.landmark.banner + | common.attrs.aria.role.presentation + )? ) header.inner = ( common.inner.flow ) @@ -94,12 +109,27 @@ element footer { footer.inner & footer.attrs } footer.attrs = ( common.attrs - & ( common.attrs.aria.implicit.region - | common.attrs.aria.landmark.contentinfo - )? + & ( common.attrs.aria.implicit.region + | common.attrs.aria.landmark.contentinfo + | common.attrs.aria.role.presentation + )? ) footer.inner = ( common.inner.flow ) common.elem.flow |= footer.elem +## main content: <main> + + main.elem = + element main { main.inner & main.attrs } + main.attrs = + ( common.attrs + & ( common.attrs.aria.implicit.region + | common.attrs.aria.landmark.main + )? + ) + main.inner = + ( common.inner.flow ) + + common.elem.flow |= main.elem diff --git a/xml/relaxng/src/resources/html5-schema/tables.rnc b/xml/relaxng/src/resources/html5-schema/tables.rnc index e29b1cbca227..3e5d72513b7f 100644 --- a/xml/relaxng/src/resources/html5-schema/tables.rnc +++ b/xml/relaxng/src/resources/html5-schema/tables.rnc @@ -78,7 +78,10 @@ datatypes w = "http://whattf.org/datatype-draft" element caption { caption.inner & caption.attrs } caption.attrs = ( common.attrs - & common.attrs.aria.implicit.region? + & ( common.attrs.aria.implicit.region + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) caption.inner = ( common.inner.flow ) @@ -91,7 +94,11 @@ datatypes w = "http://whattf.org/datatype-draft" colgroup.elem = element colgroup { colgroup.inner & colgroup.attrs } colgroup.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) colgroup.attrs.span = attribute span { common.data.integer.positive @@ -108,6 +115,9 @@ datatypes w = "http://whattf.org/datatype-draft" col.attrs = ( common.attrs & col.attrs.span? + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) col.attrs.span = attribute span { @@ -121,7 +131,11 @@ datatypes w = "http://whattf.org/datatype-draft" thead.elem = element thead { thead.inner & thead.attrs } thead.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) thead.inner = ( tr.elem* ) @@ -130,7 +144,11 @@ datatypes w = "http://whattf.org/datatype-draft" tfoot.elem = element tfoot { tfoot.inner & tfoot.attrs } tfoot.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) tfoot.inner = ( tr.elem* ) @@ -139,7 +157,11 @@ datatypes w = "http://whattf.org/datatype-draft" tbody.elem = element tbody { tbody.inner & tbody.attrs } tbody.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) tbody.inner = ( tr.elem* ) @@ -218,7 +240,10 @@ datatypes w = "http://whattf.org/datatype-draft" & tables.attrs.scope? & tables.attrs.headers? # & tables.attrs.alignment - & common.attrs.aria.implicit.th? + & ( common.attrs.aria.implicit.th + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) th.inner = - ( common.inner.phrasing ) + ( common.inner.flow ) diff --git a/xml/relaxng/src/resources/html5-schema/web-forms.rnc b/xml/relaxng/src/resources/html5-schema/web-forms.rnc index d5d8f6eab3c9..73b89d8c5081 100644 --- a/xml/relaxng/src/resources/html5-schema/web-forms.rnc +++ b/xml/relaxng/src/resources/html5-schema/web-forms.rnc @@ -54,10 +54,10 @@ datatypes w = "http://whattf.org/datatype-draft" & common-form.attrs & input.text.attrs.type? & shared-form.attrs.maxlength? - & shared-form.attrs.readonly? + & shared-form.attrs.readonly? & shared-form.attrs.size? & input.text.attrs.value? - & ( common.attrs.aria + & ( common.attrs.aria? | common.attrs.aria.implicit.input )? ) @@ -84,7 +84,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.readonly? & shared-form.attrs.size? & input.password.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.password.attrs.type = attribute type { @@ -107,7 +107,7 @@ datatypes w = "http://whattf.org/datatype-draft" & input.checkbox.attrs.type & input.attrs.checked? & input.checkbox.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.checkbox.attrs.type = attribute type { @@ -130,7 +130,9 @@ datatypes w = "http://whattf.org/datatype-draft" & input.radio.attrs.type & input.attrs.checked? & input.radio.attrs.value? - & common.attrs.aria.implicit.input? + & ( common.attrs.aria.role.radio + | common.attrs.aria.role.menuitemradio + )? ) input.radio.attrs.type = attribute type { @@ -152,8 +154,13 @@ datatypes w = "http://whattf.org/datatype-draft" & common-form.attrs & input.button.attrs.type & input.button.attrs.value? - & ( common.attrs.aria - | common.attrs.aria.implicit.button + & ( common.attrs.aria.implicit.button + | common.attrs.aria.role.button + | common.attrs.aria.role.link + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.menuitemcheckbox + | common.attrs.aria.role.menuitemradio + | common.attrs.aria.role.radio )? ) input.button.attrs.type = @@ -177,7 +184,7 @@ datatypes w = "http://whattf.org/datatype-draft" & common-form.attrs & input.submit.attrs.type & input.submit.attrs.value? - & common.attrs.aria.implicit.button? + & common.attrs.aria? ) input.submit.attrs.type = attribute type { @@ -199,7 +206,7 @@ datatypes w = "http://whattf.org/datatype-draft" & common-form.attrs & input.reset.attrs.type & input.reset.attrs.value? - & common.attrs.aria.implicit.button? + & common.attrs.aria? ) input.reset.attrs.type = attribute type { @@ -222,7 +229,7 @@ datatypes w = "http://whattf.org/datatype-draft" & common-form.attrs & input.file.attrs.type & input.file.attrs.accept? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.file.attrs.type = attribute type { @@ -244,6 +251,7 @@ datatypes w = "http://whattf.org/datatype-draft" & common-form.attrs & input.hidden.attrs.type & input.hidden.attrs.value? + & common.attrs.aria? ) input.hidden.attrs.type = attribute type { @@ -266,8 +274,13 @@ datatypes w = "http://whattf.org/datatype-draft" & input.image.attrs.type & input.image.attrs.alt & input.image.attrs.src? - & ( common.attrs.aria - | common.attrs.aria.implicit.button + & ( common.attrs.aria.implicit.button + | common.attrs.aria.role.button + | common.attrs.aria.role.link + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.menuitemcheckbox + | common.attrs.aria.role.menuitemradio + | common.attrs.aria.role.radio )? ) input.image.attrs.type = @@ -296,7 +309,12 @@ datatypes w = "http://whattf.org/datatype-draft" & common-form.attrs & shared-form.attrs.readonly? & textarea.attrs.rows-and-cols-wf1 - & common.attrs.aria.implicit.input? + & ( common.attrs.aria.implicit.input + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.combobox + | common.attrs.aria.role.textbox + )? #FIXME onfocus, onblur, onselect,onchange ) # This is ugly. @@ -333,7 +351,12 @@ datatypes w = "http://whattf.org/datatype-draft" & option.attrs.selected? & option.attrs.label? & option.attrs.value? - & common.attrs.aria.implicit.input? + & ( common.attrs.aria.implicit.input + | common.attrs.aria.role.option + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitemradio + | common.attrs.aria.role.menuitemcheckbox + )? ) option.attrs.selected = attribute selected { @@ -358,6 +381,9 @@ datatypes w = "http://whattf.org/datatype-draft" ( common.attrs & optgroup.attrs.label & common-form.attrs.disabled? + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) optgroup.attrs.label = attribute label { @@ -369,13 +395,17 @@ datatypes w = "http://whattf.org/datatype-draft" ## Selection Menu: <select> select.elem = - element select { select.inner & select.attrs } + element select { select.inner & select.attrs } select.attrs = ( common.attrs & common-form.attrs & select.attrs.size? & select.attrs.multiple? # FIXME onfocus, onblur, onchange + & ( common.attrs.aria.role.listbox # aria-multiselectable depends on "multiple" value; check in assertions + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) select.attrs.size = attribute size { @@ -410,7 +440,14 @@ datatypes w = "http://whattf.org/datatype-draft" & common-form.attrs & button.submit.attrs.type? & button.attrs.value? - & common.attrs.aria.implicit.button? + & ( common.attrs.aria.implicit.button + | common.attrs.aria.role.button + | common.attrs.aria.role.link + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.menuitemcheckbox + | common.attrs.aria.role.menuitemradio + | common.attrs.aria.role.radio + )? ) button.submit.attrs.type = attribute type { @@ -428,7 +465,14 @@ datatypes w = "http://whattf.org/datatype-draft" & common-form.attrs & button.reset.attrs.type & button.attrs.value? #REVISIT I guess this still affects the DOM - & common.attrs.aria.implicit.button? + & ( common.attrs.aria.implicit.button + | common.attrs.aria.role.button + | common.attrs.aria.role.link + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.menuitemcheckbox + | common.attrs.aria.role.menuitemradio + | common.attrs.aria.role.radio + )? ) button.reset.attrs.type = attribute type { @@ -446,8 +490,13 @@ datatypes w = "http://whattf.org/datatype-draft" & common-form.attrs & button.button.attrs.type & button.attrs.value? #REVISIT I guess this still affects the DOM - & ( common.attrs.aria - | common.attrs.aria.implicit.button + & ( common.attrs.aria.implicit.button + | common.attrs.aria.role.button + | common.attrs.aria.role.link + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.menuitemcheckbox + | common.attrs.aria.role.menuitemradio + | common.attrs.aria.role.radio )? ) button.button.attrs.type = @@ -470,7 +519,7 @@ datatypes w = "http://whattf.org/datatype-draft" & form.attrs.enctype? & common-form.attrs.name? & form.attrs.accept-charset? - & ( common.attrs.aria + & ( common.attrs.aria? | common.attrs.aria.implicit.region )? ) @@ -507,7 +556,9 @@ datatypes w = "http://whattf.org/datatype-draft" element fieldset { fieldset.inner & fieldset.attrs } fieldset.attrs = ( common.attrs - & common.attrs.aria.implicit.group? + & ( common.attrs.aria? + | common.attrs.aria.implicit.region + )? ) fieldset.inner = ( legend.elem? #REVISIT should this be required? @@ -523,7 +574,10 @@ datatypes w = "http://whattf.org/datatype-draft" label.attrs = ( common.attrs & label.attrs.for? - & common.attrs.aria.implicit.region? + & ( common.attrs.aria.implicit.region + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) label.attrs.for = attribute for { diff --git a/xml/relaxng/src/resources/html5-schema/web-forms2.rnc b/xml/relaxng/src/resources/html5-schema/web-forms2.rnc index 98d9f4c72d27..d77067baf6f8 100644 --- a/xml/relaxng/src/resources/html5-schema/web-forms2.rnc +++ b/xml/relaxng/src/resources/html5-schema/web-forms2.rnc @@ -194,7 +194,7 @@ datatypes w = "http://whattf.org/datatype-draft" ## Global Date and Time: <input type='datetime'> input.datetime.elem = - element input { input.datetime.attrs } + element input { input.datetime.attrs } input.datetime.attrs = ( common.attrs & common-form.attrs @@ -208,7 +208,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.readonly? & shared-form.attrs.required? & input.datetime.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.datetime.attrs.type = attribute type { @@ -224,7 +224,7 @@ datatypes w = "http://whattf.org/datatype-draft" } input.datetime.attrs.value = attribute value { - common.data.datetime + w:string "" | common.data.datetime } input.elem |= input.datetime.elem @@ -246,7 +246,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.readonly? & shared-form.attrs.required? & input.datetime-local.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.datetime-local.attrs.type = attribute type { @@ -262,7 +262,7 @@ datatypes w = "http://whattf.org/datatype-draft" } input.datetime-local.attrs.value = attribute value { - form.data.datetime-local + w:string "" | form.data.datetime-local } input.elem |= input.datetime-local.elem @@ -284,7 +284,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.readonly? & shared-form.attrs.required? & input.date.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.date.attrs.type = attribute type { @@ -300,7 +300,7 @@ datatypes w = "http://whattf.org/datatype-draft" } input.date.attrs.value = attribute value { - form.data.date + w:string "" | form.data.date } input.elem |= input.date.elem @@ -322,7 +322,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.readonly? & shared-form.attrs.required? & input.month.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.month.attrs.type = attribute type { @@ -338,7 +338,7 @@ datatypes w = "http://whattf.org/datatype-draft" } input.month.attrs.value = attribute value { - form.data.month + w:string "" | form.data.month } input.elem |= input.month.elem @@ -360,7 +360,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.readonly? & shared-form.attrs.required? & input.time.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.time.attrs.type = attribute type { @@ -376,7 +376,7 @@ datatypes w = "http://whattf.org/datatype-draft" } input.time.attrs.value = attribute value { - form.data.time + w:string "" | form.data.time } input.elem |= input.time.elem @@ -398,7 +398,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.readonly? & shared-form.attrs.required? & input.week.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.week.attrs.type = attribute type { @@ -414,7 +414,7 @@ datatypes w = "http://whattf.org/datatype-draft" } input.week.attrs.value = attribute value { - form.data.week + w:string "" | form.data.week } input.elem |= input.week.elem @@ -435,8 +435,9 @@ datatypes w = "http://whattf.org/datatype-draft" & input.attrs.step.float? & shared-form.attrs.readonly? & shared-form.attrs.required? + & shared-form.attrs.placeholder? & input.number.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.number.attrs.type = attribute type { @@ -452,7 +453,7 @@ datatypes w = "http://whattf.org/datatype-draft" } input.number.attrs.value = attribute value { - common.data.float + w:string "" | common.data.float } input.elem |= input.number.elem @@ -472,7 +473,7 @@ datatypes w = "http://whattf.org/datatype-draft" & input.range.attrs.max? & input.attrs.step.float? & input.range.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.range.attrs.type = attribute type { @@ -515,7 +516,7 @@ datatypes w = "http://whattf.org/datatype-draft" ) | input.email.attrs.value.single? )? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.email.attrs.type = attribute type { @@ -535,7 +536,7 @@ datatypes w = "http://whattf.org/datatype-draft" ## IRI: <input type='url'> input.url.elem = - element input { input.url.attrs } + element input { input.url.attrs } input.url.attrs = ( common.attrs & common-form.attrs @@ -550,7 +551,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.size? & shared-form.attrs.placeholder? & input.url.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.url.attrs.type = attribute type { @@ -566,7 +567,7 @@ datatypes w = "http://whattf.org/datatype-draft" ## Search: <input type='search'> input.search.elem = - element input { input.search.attrs } + element input { input.search.attrs } input.search.attrs = ( common.attrs & common-form.attrs @@ -582,7 +583,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.placeholder? & shared-form.attrs.dirname? & input.search.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.search.attrs.type = attribute type { @@ -613,7 +614,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.size? & shared-form.attrs.placeholder? & input.tel.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.tel.attrs.type = attribute type { @@ -638,7 +639,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.autofocus? & input.attrs.list? & input.color.attrs.value? - & common.attrs.aria.implicit.input? + & common.attrs.aria? ) input.color.attrs.type = attribute type { @@ -646,7 +647,7 @@ datatypes w = "http://whattf.org/datatype-draft" } input.color.attrs.value = attribute value { - form.data.color + w:string "" | form.data.color } input.elem |= input.color.elem @@ -660,7 +661,7 @@ datatypes w = "http://whattf.org/datatype-draft" & common-form.attrs.name? & common-form.attrs.form? & output.attrs.for? - & common.attrs.aria.implicit.region? + & common.attrs.aria? ) output.attrs.for = attribute for { @@ -710,7 +711,12 @@ datatypes w = "http://whattf.org/datatype-draft" datalist.inner = ( option.elem* & common.inner.phrasing ) datalist.attrs = - ( common.attrs ) + ( common.attrs + & ( common.attrs.aria.role.listbox # aria-multiselectable must be false; check by assertions + | common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) common.elem.phrasing |= datalist.elem @@ -777,7 +783,9 @@ datatypes w = "http://whattf.org/datatype-draft" & keygen.attrs.keytype? & shared-form.attrs.autofocus? & common-form.attrs? - #REVISIT which ARIA attributes needed here + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? ) keygen.attrs.challenge = attribute challenge { diff --git a/xml/relaxng/src/resources/html5-schema/xhtml5.rnc b/xml/relaxng/src/resources/html5-schema/xhtml5.rnc index 1c6c52417c5b..2d17f9f8e259 100644 --- a/xml/relaxng/src/resources/html5-schema/xhtml5.rnc +++ b/xml/relaxng/src/resources/html5-schema/xhtml5.rnc @@ -17,12 +17,15 @@ include "common.rnc" { v5only = empty } +include "common-ext.rnc" + # ##################################################################### ## Language Definitions start = html.elem include "meta.rnc" +include "meta-ext.rnc" include "phrase.rnc" include "block.rnc" include "sectional.rnc" @@ -32,6 +35,7 @@ include "embed.rnc" include "ruby.rnc" include "media.rnc" include "core-scripting.rnc" +include "core-scripting-ext.rnc" include "tables.rnc" include "form-datatypes.rnc" include "web-forms.rnc" |