diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-type-attr.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-type-attr.rnc index eefb00fe5..b35845db7 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-type-attr.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-type-attr.rnc @@ -6,7 +6,7 @@ ## to reset the definition of the class of attributes ## where epub:type is added in the nav doc schema, and ## common.attrs.other is augmented by other schemas. - ## We therefore augment common.attrs (and also attrobute + ## We therefore augment common.attrs (and also attribute ## lists that are not based on common.attrs) common.attrs.basic &= epub.type.attr? diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3.rnc index ad272e6aa..b988f39ac 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3.rnc @@ -2,4 +2,9 @@ namespace math = "http://www.w3.org/1998/Math/MathML" include "epub-mathml3.rnc" -common.elem.phrasing |= math \ No newline at end of file +common.elem.phrasing |= math + +math.attributes &= + ( common.attrs.aria.role.math + | common.attrs.aria.implicit.math + )? diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/README b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/README index d32a0826c..2b220f747 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/README +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/README @@ -3,7 +3,12 @@ The modules in this directory are part of the schema that defines a vocabulary and grammar for EPUB3 XHTML Content Documents [1], based on W3C HTML [2], with EPUB extensions. -The modules are derived from the schemas used in the Nu Html Checker [3]. +The modules are derived from the schemas used in the Nu Html Checker [3], +up-to-date with commit d00d51a585175f09c67c150aeb6891d3695bfebf + +The file `epubcheck.patch` was created when first importing the HTML schemas, +to document how the type system was adapted. It is not intended to be applied +automatically as a patch file. [1] p://www.idpf.org/epub3/latest/contentdocs [2] https://www.w3.org/TR/html/ diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/applications.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/applications.rnc index b7491c972..609d79f9d 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/applications.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/applications.rnc @@ -98,18 +98,7 @@ ( common.attrs & dialog.attrs.open? & ( common.attrs.aria.implicit.dialog - | common.attrs.aria.role.alert | common.attrs.aria.role.alertdialog - | common.attrs.aria.role.application - | common.attrs.aria.role.contentinfo - | common.attrs.aria.role.dialog - | common.attrs.aria.role.log - | common.attrs.aria.role.marquee - | common.attrs.aria.role.region - | common.attrs.aria.role.status - | common.attrs.aria.landmark.document - | common.attrs.aria.landmark.main - | common.attrs.aria.landmark.search )? ) dialog.attrs.open = @@ -126,12 +115,14 @@ element menu { menu.inner & menu.attrs } menu.attrs = ( common.attrs - & ( common.attrs.aria.implicit.toolbar + & ( common.attrs.aria.implicit.list | common.attrs.aria.role.directory + | common.attrs.aria.role.group | common.attrs.aria.role.list | common.attrs.aria.role.listbox | common.attrs.aria.role.menu | common.attrs.aria.role.menubar + | common.attrs.aria.role.radiogroup | common.attrs.aria.role.tablist | common.attrs.aria.role.toolbar | common.attrs.aria.role.tree diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/aria.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/aria.rnc index a0b2474a1..adf32917d 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/aria.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/aria.rnc @@ -104,6 +104,9 @@ common.attrs.aria.implicit.listitem |= & aria.state.expanded? ) +common.attrs.aria.implicit.math |= + ( aria.state.expanded? ) + common.attrs.aria.implicit.option |= ( aria.prop.posinset? & aria.prop.setsize? @@ -146,6 +149,14 @@ common.attrs.aria.implicit.searchbox |= & 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? @@ -276,34 +287,9 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark ## dropeffect aria.state.dropeffect = attribute aria-dropeffect - { token "none" #default - | token "popup" - | token "execute" - | list - { ( string "copy" ) - , ( string "execute" )? - } - | list - { ( string "move" ) - , ( string "execute" )? - } - | list - { ( string "link" ) - , ( string "execute" )? - } - | list - { ( string "execute" ) - , ( string "copy" ) - } - | list - { ( string "execute" ) - , ( string "move" ) - } - | list - { ( string "execute" ) - , ( string "link" ) - } - } + { + list { ("copy" | "execute" | "link" | "move" | "none" | "popup") + } + } ## expanded aria.state.expanded = @@ -1047,6 +1033,7 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark attribute role { string "math" } common.attrs.aria |= aria.math + common.attrs.aria.role.math |= aria.math ## menu aria.menu = @@ -1292,6 +1279,7 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark attribute role { string "scrollbar" } common.attrs.aria |= aria.scrollbar + common.attrs.aria.role.scrollbar |= aria.scrollbar ## search aria.search = diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/block.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/block.rnc index 850e64c34..714531882 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/block.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/block.rnc @@ -1,4 +1,5 @@ + # ##################################################################### ## RELAX NG Schema for HTML 5: Basic Prose Markup # # ##################################################################### @@ -25,7 +26,8 @@ element hr { hr.inner & hr.attrs } hr.attrs = ( common.attrs - & ( common.attrs.aria.role.separator + & ( common.attrs.aria.implicit.separator + | common.attrs.aria.role.separator | common.attrs.aria.role.presentation | common.attrs.aria.role.doc-pagebreak )? @@ -278,4 +280,11 @@ ) legend.inner = ( common.inner.phrasing + & h1.elem? + & h2.elem? + & h3.elem? + & h4.elem? + & h5.elem? + & h6.elem? + & hgroup.elem? ) diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/common.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/common.rnc index bb1c4a91d..7eb2d1ecb 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/common.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/common.rnc @@ -1,4 +1,5 @@ + # ##################################################################### ## RELAX NG Schema for HTML 5: Common Definitions # # ##################################################################### @@ -200,7 +201,25 @@ common.attrs.present = } common.attrs.other = - empty + ( common.attrs.autofocus? + & common.attrs.inputmode? + & common.attrs.nonce? + ) + + common.attrs.autofocus = + attribute autofocus { + "autofocus" | "" + } + + common.attrs.inputmode = + attribute inputmode { + string + } + + common.attrs.nonce = + attribute nonce { + string + } # ##################################################################### ## Common Datatypes # @@ -459,7 +478,6 @@ common.attrs.aria.role.cell |= ( 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 ) @@ -480,7 +498,6 @@ 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 ) @@ -525,6 +542,7 @@ common.attrs.aria.implicit.list = ( notAllowed ) common.attrs.aria.implicit.listbox = ( notAllowed ) common.attrs.aria.implicit.listitem = ( notAllowed ) common.attrs.aria.implicit.main = ( notAllowed ) +common.attrs.aria.implicit.math |= ( notAllowed ) common.attrs.aria.implicit.navigation = ( notAllowed ) common.attrs.aria.implicit.option = ( notAllowed ) common.attrs.aria.implicit.progressbar = ( notAllowed ) @@ -535,6 +553,7 @@ common.attrs.aria.implicit.rowgroup |= ( notAllowed ) common.attrs.aria.implicit.searchbox |= ( notAllowed ) common.attrs.aria.implicit.section = ( notAllowed ) common.attrs.aria.implicit.select = ( notAllowed ) +common.attrs.aria.implicit.separator = ( notAllowed ) common.attrs.aria.implicit.slider = ( notAllowed ) common.attrs.aria.implicit.spinbutton = ( notAllowed ) common.attrs.aria.implicit.status = ( notAllowed ) diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/core-scripting.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/core-scripting.rnc index c77fd864d..dd5d87e71 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/core-scripting.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/core-scripting.rnc @@ -1,4 +1,5 @@ + # ##################################################################### ## RELAX NG Schema for HTML 5: Core Scripting # # ##################################################################### @@ -16,11 +17,8 @@ & script.attrs.nomodule? & script.attrs.language? # restricted in Schematron & script.attrs.integrity? - & script.attrs.nonce? & embedded.content.attrs.crossorigin? - & ( common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem - )? + & referrerpolicy? ) script.elem.imported = element script { script.inner.imported & script.attrs.imported } @@ -34,11 +32,8 @@ & script.attrs.charset? & script.attrs.language? # restricted in Schematron & script.attrs.integrity? - & script.attrs.nonce? & embedded.content.attrs.crossorigin? - & ( common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem - )? + & referrerpolicy? ) script.attrs.src = attribute src { @@ -72,10 +67,6 @@ attribute integrity { common.data.integrity } - script.attrs.nonce = - attribute nonce{ - string - } script.inner.embedded = ( common.inner.anything ) script.inner.imported = @@ -111,11 +102,7 @@ noscript.inner.flow = ( common.inner.flow ) noscript.attrs = - ( common.attrs - & ( common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem - )? - ) + ( common.attrs ) common.elem.metadata |= noscript.elem.head common.elem.phrasing |= noscript.elem.phrasing @@ -126,8 +113,7 @@ common.attrs.scripting &= ( scripting.attr.onabort? - & scripting.attr.onautocomplete? - & scripting.attr.onautocompleteerror? + & scripting.attr.onauxclick? & scripting.attr.onblur? & scripting.attr.oncancel? & scripting.attr.oncanplay? @@ -135,8 +121,10 @@ & scripting.attr.onchange? & scripting.attr.onclick? & scripting.attr.onclose? - & scripting.attr.oncuechange? & scripting.attr.oncontextmenu? + & scripting.attr.oncopy? + & scripting.attr.oncuechange? + & scripting.attr.oncut? & scripting.attr.ondblclick? & scripting.attr.ondrag? & scripting.attr.ondragend? @@ -151,8 +139,7 @@ & scripting.attr.onended? & scripting.attr.onerror? & scripting.attr.onfocus? - & scripting.attr.onfocusin? - & scripting.attr.onfocusout? + & scripting.attr.onformdata? & scripting.attr.oninput? & scripting.attr.oninvalid? & scripting.attr.onkeydown? @@ -169,7 +156,7 @@ & scripting.attr.onmouseout? & scripting.attr.onmouseover? & scripting.attr.onmouseup? - & scripting.attr.onwheel? + & scripting.attr.onpaste? & scripting.attr.onpause? & scripting.attr.onplay? & scripting.attr.onplaying? @@ -178,10 +165,11 @@ & scripting.attr.onreset? & scripting.attr.onresize? & scripting.attr.onscroll? + & scripting.attr.onsecuritypolicyviolation? & scripting.attr.onseeked? & scripting.attr.onseeking? & scripting.attr.onselect? - & scripting.attr.onsort? + & scripting.attr.onslotchange? & scripting.attr.onstalled? & scripting.attr.onsubmit? & scripting.attr.onsuspend? @@ -189,16 +177,15 @@ & scripting.attr.ontoggle? & scripting.attr.onvolumechange? & scripting.attr.onwaiting? + & scripting.attr.onwheel? ) common.attrs.other &= common.attrs.scripting scripting.attr.onabort = attribute onabort { common.data.functionbody } - scripting.attr.onautocomplete = - attribute onautocomplete { common.data.functionbody } - scripting.attr.onautocompleteerror = - attribute onautocompleteerror { common.data.functionbody } + scripting.attr.onauxclick = + attribute onauxclick { common.data.functionbody } scripting.attr.onblur = attribute onblur { common.data.functionbody } scripting.attr.oncanplay = @@ -215,8 +202,12 @@ attribute onclose { common.data.functionbody } scripting.attr.oncontextmenu = attribute oncontextmenu { common.data.functionbody } + scripting.attr.oncopy = + attribute oncopy { common.data.functionbody } scripting.attr.oncuechange = attribute oncuechange { common.data.functionbody } + scripting.attr.oncut = + attribute oncut { common.data.functionbody } scripting.attr.ondblclick = attribute ondblclick { common.data.functionbody } scripting.attr.ondrag = @@ -245,12 +236,10 @@ attribute onerror { common.data.functionbody } scripting.attr.onfocus = attribute onfocus { common.data.functionbody } - scripting.attr.onfocusin = - attribute onfocusin { common.data.functionbody } - scripting.attr.onfocusout = - attribute onfocusout { common.data.functionbody } scripting.attr.onformchange = attribute onformchange { common.data.functionbody } + scripting.attr.onformdata = + attribute onformdata { common.data.functionbody } scripting.attr.onforminput = attribute onforminput { common.data.functionbody } scripting.attr.oninput = @@ -287,6 +276,8 @@ attribute onmouseup { common.data.functionbody } scripting.attr.onwheel = attribute onwheel { common.data.functionbody } + scripting.attr.onpaste = + attribute onpaste { common.data.functionbody } scripting.attr.onpause = attribute onpause { common.data.functionbody } scripting.attr.onplay = @@ -303,14 +294,16 @@ attribute onresize { common.data.functionbody } scripting.attr.onscroll = attribute onscroll { common.data.functionbody } + scripting.attr.onsecuritypolicyviolation = + attribute onsecuritypolicyviolation { common.data.functionbody } scripting.attr.onseeked = attribute onseeked { common.data.functionbody } scripting.attr.onseeking = attribute onseeking { common.data.functionbody } scripting.attr.onselect = attribute onselect { common.data.functionbody } - scripting.attr.onsort = - attribute onsort { common.data.functionbody } + scripting.attr.onslotchange = + attribute onslotchange { common.data.functionbody } scripting.attr.onstalled = attribute onstalled { common.data.functionbody } scripting.attr.onsubmit = diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/data.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/data.rnc index 3878e65a2..fc5592c9f 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/data.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/data.rnc @@ -1,4 +1,5 @@ + # ##################################################################### ## RELAX NG Schema for HTML 5: Static Data Markup # # ##################################################################### @@ -64,9 +65,6 @@ & meter.attrs.high? & meter.attrs.max? & meter.attrs.optimum? - & ( common.attrs.aria.implicit.progressbar - | common.attrs.aria.role.progressbar - )? ) meter.attrs.value = attribute value { diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/embed.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/embed.rnc index b2bc678d5..5bbff8827 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/embed.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/embed.rnc @@ -1,3 +1,4 @@ + namespace local = "" # ##################################################################### @@ -9,26 +10,53 @@ namespace local = "" ## Images: - img.elem = - element img { img.inner & img.attrs } - img.attrs = + shared-img.attrs = ( common.attrs & img.attrs.src & img.attrs.srcset? & img.attrs.sizes? - & img.attrs.alt? # ARIA: if alt empty, only allowed role value is "presentation"; check in assertions + & img.attrs.generator-unable-to-provide-required-alt? & img.attrs.height? & img.attrs.width? & img.attrs.usemap? & img.attrs.ismap? & img.attrs.decoding? + & img.attrs.loading? & img.attrs.border? # obsolete & referrerpolicy? & embedded.content.attrs.crossorigin? + ) + + no-alt-img.elem = + element img { img.inner & shared-img.attrs } + + img.elem = + element img { img.inner & img.attrs } + img.attrs = + ( shared-img.attrs + & img.attrs.alt & ( common.attrs.aria.implicit.img - | common.attrs.aria + | common.attrs.aria.implicit.img + | common.attrs.aria.role.button + | common.attrs.aria.role.checkbox + | common.attrs.aria.role.img + | common.attrs.aria.role.link + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.menuitemcheckbox + | common.attrs.aria.role.menuitemradio + | common.attrs.aria.role.none + | common.attrs.aria.role.option + | common.attrs.aria.role.presentation + | common.attrs.aria.role.progressbar + | common.attrs.aria.role.scrollbar + | common.attrs.aria.role.separator + | common.attrs.aria.role.slider + | common.attrs.aria.role.switch + | common.attrs.aria.role.tab + | common.attrs.aria.role.treeitem )? ) + img.attrs.src = attribute src { common.data.uri.non-empty @@ -45,6 +73,10 @@ namespace local = "" attribute alt { text } + img.attrs.generator-unable-to-provide-required-alt = + attribute generator-unable-to-provide-required-alt { + string "" + } img.attrs.height = attribute height { common.data.integer.non-negative @@ -68,6 +100,10 @@ namespace local = "" | string "auto" ) } + img.attrs.loading = + attribute loading { + string "lazy" | string "eager" + } img.attrs.border = attribute border { common.data.zero @@ -75,6 +111,7 @@ namespace local = "" img.inner = empty + common.elem.phrasing |= no-alt-img.elem common.elem.phrasing |= img.elem ## Image with multiple sources: @@ -173,12 +210,14 @@ namespace local = "" | translate | style | tabindex + | autofocus | contenteditable | draggable | hidden + | inputmode + | nonce | onabort - | onautocomplete - | onautocompleteerror + | onauxclick | onblur | oncancel | oncanplay @@ -187,7 +226,9 @@ namespace local = "" | onclick | onclose | oncontextmenu + | oncopy | oncuechange + | oncut | ondblclick | ondrag | ondragend @@ -202,8 +243,7 @@ namespace local = "" | onended | onerror | onfocus - | onfocusin - | onfocusout + | onformdata | oninput | oninvalid | onkeydown @@ -220,7 +260,7 @@ namespace local = "" | onmouseout | onmouseover | onmouseup - | onwheel + | onpaste | onpause | onplay | onplaying @@ -229,10 +269,11 @@ namespace local = "" | onreset | onresize | onscroll + | onsecuritypolicyviolation | onseeked | onseeking + | onslotchange | onselect - | onsort | onstalled | onsubmit | onsuspend @@ -240,6 +281,7 @@ namespace local = "" | ontoggle | onvolumechange | onwaiting + | onwheel | role | aria-atomic | aria-busy @@ -274,6 +316,8 @@ namespace local = "" | itemid | name | align + | hspace + | vspace | about | prefix | property @@ -354,7 +398,6 @@ namespace local = "" ) | object.attrs.type ) - & object.attrs.typemustmatch? # & object.attrs.classid? # & object.attrs.codebase? # & object.attrs.codetype? @@ -366,7 +409,6 @@ namespace local = "" & ( common.attrs.aria.role.application | common.attrs.aria.landmark.document | common.attrs.aria.role.img - | common.attrs.aria.role.presentation )? ) object.attrs.data = @@ -377,10 +419,6 @@ namespace local = "" attribute type { common.data.mimetype } - object.attrs.typemustmatch = - attribute typemustmatch { - "typemustmatch" | "" - } & v5only object.attrs.height = attribute height { common.data.integer.non-negative @@ -417,9 +455,6 @@ 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 { @@ -512,9 +547,6 @@ 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 { diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/media.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/media.rnc index ba0c802d7..b70d7100e 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/media.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/media.rnc @@ -1,4 +1,4 @@ -datatypes w = "http://whattf.org/datatype-draft" + # ##################################################################### ## RELAX NG Schema for HTML 5: Advanced Embedded Content # @@ -44,9 +44,6 @@ datatypes w = "http://whattf.org/datatype-draft" ( common.attrs & source.attrs.src & source.attrs.type? - & ( common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem - )? ) source.attrs.src = attribute src { @@ -153,9 +150,6 @@ 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 { diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/meta.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/meta.rnc index 45ce4123b..5f9c57b56 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/meta.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/meta.rnc @@ -1,4 +1,5 @@ + # ##################################################################### ## RELAX NG Schema for HTML 5: Global Structure & Metadata # # ##################################################################### @@ -21,9 +22,6 @@ head.attrs = ( common.attrs # & head.attrs.profile? - & ( common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem - )? ) # head.attrs.profile = # attribute profile { @@ -105,11 +103,7 @@ title.elem = element title { title.inner & title.attrs } title.attrs = - ( common.attrs - & ( common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem - )? - ) + ( common.attrs ) title.inner = ( text ) @@ -152,22 +146,19 @@ & link.attrs.rel & link.attrs.as? & link.attrs.integrity? - & link.attrs.nonce? & shared-hyperlink.attrs.hreflang? & shared-hyperlink.attrs.media? & shared-hyperlink.attrs.type? & referrerpolicy? & link.attrs.sizes? & link.attrs.color? + & link.attrs.disabled? & link.attrs.scope? & link.attrs.updateviacache? & link.attrs.workertype? # link.attrs.title included in common.attrs & embedded.content.attrs.crossorigin? - & ( common.attrs.aria.role.link - | common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem - )? + & common.attrs.aria.role.link? ) link.attrs.href = attribute href { @@ -175,7 +166,7 @@ } link.attrs.rel = attribute rel { - datatype.html5.space.separated.tokens + string } link.attrs.as = attribute as { @@ -203,10 +194,6 @@ attribute integrity { common.data.integrity } - link.attrs.nonce = - attribute nonce{ - string - } link.attrs.sizes = attribute sizes { "any" | common.data.sizes @@ -215,6 +202,10 @@ attribute color { common.data.color } + link.attrs.disabled = + attribute disabled { + "disabled" | "" + } link.attrs.scope = attribute scope { common.data.uri @@ -245,11 +236,7 @@ ( common.attrs & style.attrs.type? & style.attrs.media? - & style.attrs.nonce? # style.attrs.title included in common.attrs - & ( common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem - )? ) style.attrs.type = attribute type { @@ -259,10 +246,6 @@ attribute media { common.data.mediaquery } - style.attrs.nonce = - attribute nonce{ - string - } style.inner = ( common.inner.anything ) @@ -283,9 +266,6 @@ & common.attrs.microdata.itemscope? & common.attrs.microdata.itemtype? & common.attrs.microdata.itemid? - & ( common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem - )? ) meta.name.attrs.name = attribute name { @@ -311,9 +291,6 @@ & 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 { @@ -338,9 +315,6 @@ & 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 { @@ -366,9 +340,6 @@ & common.attrs.other & meta.http-equiv.attrs.http-equiv.content-security-policy & meta.http-equiv.attrs.content.content-security-policy - & ( common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem - )? ) meta.http-equiv.attrs.http-equiv.content-security-policy = attribute http-equiv { @@ -391,9 +362,6 @@ & 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 { @@ -415,9 +383,6 @@ & 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 { @@ -439,9 +404,6 @@ & 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/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/microdata.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/microdata.rnc index 21ca2a365..17e866e07 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/microdata.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/microdata.rnc @@ -1,4 +1,5 @@ + # ##################################################################### ## RELAX NG Schema for HTML 5: Microdata # # ##################################################################### @@ -88,9 +89,6 @@ link.attrs &= common.attrs.microdata.itemid? & 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/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/phrase.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/phrase.rnc index 434f4410a..80185d00c 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/phrase.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/phrase.rnc @@ -1,4 +1,5 @@ + # ##################################################################### ## RELAX NG Schema for HTML 5: Phrase Markup # # ##################################################################### @@ -86,7 +87,7 @@ } shared-hyperlink.attrs.rel = attribute rel { - datatype.html5.space.separated.tokens + string } shared-hyperlink.attrs.hreflang = attribute hreflang { diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/rdfa.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/rdfa.rnc index ade7e04ee..65c0714dd 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/rdfa.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/rdfa.rnc @@ -265,9 +265,6 @@ link.rdfa.attrs.phrasing = & meta.name.attrs.name? & common.attrs.rdfa.property & meta.name.attrs.content - & ( common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem - )? ) common.elem.metadata |= meta.property.elem diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/ruby.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/ruby.rnc index 91f3b84bd..dcf714f8f 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/ruby.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/ruby.rnc @@ -1,3 +1,4 @@ + namespace local = "" # ##################################################################### @@ -22,10 +23,11 @@ namespace local = "" | rtc.elem )+ | ( rp.elem - , ( rt.elem - | rtc.elem + , ( ( rt.elem + | rtc.elem + ), + rp.elem )+ - , rp.elem ) ) )+ diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/sectional.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/sectional.rnc index 21c1926d5..7fd910510 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/sectional.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/sectional.rnc @@ -119,11 +119,7 @@ element hgroup { hgroup.inner & hgroup.attrs } hgroup.attrs = ( common.attrs - & ( common.attrs.aria.implicit.heading - | common.attrs.aria.role.heading - | common.attrs.aria.role.tab - | common.attrs.aria.role.presentation - )? + & common.attrs.aria? ) hgroup.inner = ( ( h1.elem diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/structural.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/structural.rnc index 780737431..2f2b84d8f 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/structural.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/structural.rnc @@ -12,19 +12,21 @@ | common.attrs.aria.role.alert | common.attrs.aria.role.alertdialog | common.attrs.aria.role.application - | common.attrs.aria.role.contentinfo | common.attrs.aria.role.dialog | common.attrs.aria.role.feed | common.attrs.aria.role.log | common.attrs.aria.role.marquee + | common.attrs.aria.role.presentation | common.attrs.aria.role.region | common.attrs.aria.role.status | common.attrs.aria.role.tabpanel | common.attrs.aria.landmark.banner | common.attrs.aria.landmark.complementary + | common.attrs.aria.landmark.contentinfo | common.attrs.aria.landmark.document | common.attrs.aria.landmark.main | common.attrs.aria.landmark.navigation + | common.attrs.aria.landmark.note | common.attrs.aria.landmark.search | common.attrs.aria.role.doc-abstract | common.attrs.aria.role.doc-acknowledgments @@ -42,7 +44,6 @@ | common.attrs.aria.role.doc-errata | common.attrs.aria.role.doc-example | common.attrs.aria.role.doc-foreword - | common.attrs.aria.role.doc-glossary | common.attrs.aria.role.doc-index | common.attrs.aria.role.doc-introduction | common.attrs.aria.role.doc-notice diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms.rnc index cfdf617f3..86f687361 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms.rnc @@ -1,4 +1,5 @@ + # ##################################################################### ## RELAX NG Schema for HTML 5: Web Forms 1.0 markup # # ##################################################################### @@ -171,6 +172,7 @@ | common.attrs.aria.role.option | common.attrs.aria.role.radio | common.attrs.aria.role.switch + | common.attrs.aria.role.tab )? ) input.button.attrs.type = @@ -243,9 +245,6 @@ & common-form.attrs & input.file.attrs.type & input.file.attrs.accept? - & ( common.attrs.aria? - | aria.prop.required? - ) ) input.file.attrs.type = attribute type { @@ -391,8 +390,8 @@ ( common.attrs & optgroup.attrs.label & common-form.attrs.disabled? - & ( common.attrs.aria.role.presentation - | common.attrs.aria.role.menuitem + & ( common.attrs.aria.implicit.group + | common.attrs.aria.role.group )? ) optgroup.attrs.label = @@ -414,9 +413,11 @@ & select.attrs.size? & select.attrs.multiple? # FIXME onfocus, onblur, onchange - & ( common.attrs.aria.implicit.listbox - | common.attrs.aria.role.listbox # aria-multiselectable depends on "multiple" value; check in assertions + & ( common.attrs.aria.role.listbox # aria-multiselectable depends on "multiple" value; check in assertions + | common.attrs.aria.role.combobox | common.attrs.aria.role.menu + | common.attrs.aria.implicit.combobox + | common.attrs.aria.implicit.listbox )? ) select.attrs.size = @@ -583,6 +584,7 @@ ( common.attrs & ( common.attrs.aria.implicit.group | common.attrs.aria.role.group + | common.attrs.aria.role.radiogroup | common.attrs.aria.role.presentation )? ) diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms2.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms2.rnc index a263e3152..c9dcd657b 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms2.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms2.rnc @@ -1,4 +1,5 @@ + # ##################################################################### ## RELAX NG Schema for HTML 5: Web Forms 2.0 markup # # ##################################################################### @@ -47,11 +48,6 @@ "formnovalidate" | "" } - shared-form.attrs.autofocus = - attribute autofocus { - "autofocus" | "" - } - shared-form.attrs.pattern = attribute pattern { form.data.pattern @@ -77,11 +73,6 @@ form.data.nonemptystring } - shared-form.attrs.inputmode = - attribute inputmode { - string - } - shared-form.attrs.minlength = attribute minlength { common.data.integer.non-negative @@ -89,9 +80,8 @@ ## Shared attributes for - shared-input.attrs = + shared-input-no-size.attrs = ( input.attrs.autocomplete? - & shared-form.attrs.autofocus? & input.attrs.list? & shared-form.attrs.maxlength? & shared-form.attrs.minlength? @@ -99,6 +89,21 @@ & shared-form.attrs.placeholder? & shared-form.attrs.readonly? & shared-form.attrs.required? + ) + + shared-input-no-list.attrs = + ( input.attrs.autocomplete? + & shared-form.attrs.maxlength? + & shared-form.attrs.minlength? + & shared-form.attrs.pattern? + & shared-form.attrs.placeholder? + & shared-form.attrs.readonly? + & shared-form.attrs.required? + & shared-form.attrs.size? + ) + + shared-input.attrs = + ( shared-input-no-size.attrs & shared-form.attrs.size? ) @@ -145,13 +150,11 @@ input.text.attrs &= ( input.attrs.autocomplete? - & shared-form.attrs.autofocus? & shared-form.attrs.dirname? & input.attrs.list? & shared-form.attrs.pattern? & shared-form.attrs.required? & shared-form.attrs.placeholder? - & shared-form.attrs.inputmode? & shared-form.attrs.minlength? ) @@ -159,7 +162,6 @@ input.password.attrs &= ( input.attrs.autocomplete? - & shared-form.attrs.autofocus? & input.attrs.list? & shared-form.attrs.pattern? & shared-form.attrs.placeholder? @@ -208,7 +210,12 @@ input.file.attrs &= ( shared-input.attrs & input.attrs.multiple? + & input.input.attrs.capture? ) + input.input.attrs.capture = + attribute capture { + "user" | "environment" + } ## Image Submit Button: , Extensions @@ -244,9 +251,6 @@ & input.datetime-local.attrs.max? & input.attrs.step.float? & input.datetime-local.attrs.value? - & ( common.attrs.aria? - | aria.prop.required? - ) ) input.datetime-local.attrs.type = attribute type { @@ -280,9 +284,6 @@ & input.date.attrs.max? & input.attrs.step.integer? & input.date.attrs.value? - & ( common.attrs.aria? - | aria.prop.required? - ) ) input.date.attrs.type = attribute type { @@ -316,9 +317,6 @@ & input.month.attrs.max? & input.attrs.step.integer? & input.month.attrs.value? - & ( common.attrs.aria? - | aria.prop.required? - ) ) input.month.attrs.type = attribute type { @@ -352,9 +350,6 @@ & input.time.attrs.max? & input.attrs.step.float? & input.time.attrs.value? - & ( common.attrs.aria? - | aria.prop.required? - ) ) input.time.attrs.type = attribute type { @@ -388,9 +383,6 @@ & input.week.attrs.max? & input.attrs.step.integer? & input.week.attrs.value? - & ( common.attrs.aria? - | aria.prop.required? - ) ) input.week.attrs.type = attribute type { @@ -418,7 +410,7 @@ input.number.attrs = ( common.attrs & common-form.attrs - & shared-input.attrs + & shared-input-no-size.attrs & input.number.attrs.type & input.number.attrs.min? & input.number.attrs.max? @@ -454,7 +446,7 @@ input.range.attrs = ( common.attrs & common-form.attrs - & shared-input.attrs + & shared-input-no-size.attrs & input.range.attrs.type & input.range.attrs.min? & input.range.attrs.max? @@ -490,18 +482,23 @@ input.email.attrs = ( common.attrs & common-form.attrs - & shared-input.attrs + & shared-input-no-list.attrs & input.email.attrs.type & ( ( input.attrs.multiple & input.email.attrs.value.multiple? ) | input.email.attrs.value.single? )? - & ( common.attrs.aria.implicit.textbox - | common.attrs.aria.implicit.combobox - | common.attrs.aria.role.textbox - | common.attrs.aria.role.combobox - )? + & ( + ( common.attrs.aria.implicit.textbox + | common.attrs.aria.role.textbox + )? + | ( input.attrs.list + & ( common.attrs.aria.implicit.combobox + | common.attrs.aria.role.combobox + )? + )? + ) ) input.email.attrs.type = attribute type { @@ -525,15 +522,20 @@ input.url.attrs = ( common.attrs & common-form.attrs - & shared-input.attrs + & shared-input-no-list.attrs & input.url.attrs.type & input.url.attrs.value? - & ( common.attrs.aria.implicit.textbox - | common.attrs.aria.implicit.combobox - | common.attrs.aria.role.textbox - | common.attrs.aria.role.combobox - )? - ) + & ( + ( common.attrs.aria.implicit.textbox + | common.attrs.aria.role.textbox + )? + | ( input.attrs.list + & ( common.attrs.aria.implicit.combobox + | common.attrs.aria.role.combobox + )? + )? + ) + ) input.url.attrs.type = attribute type { "url" @@ -578,15 +580,20 @@ input.tel.attrs = ( common.attrs & common-form.attrs - & shared-input.attrs + & shared-input-no-list.attrs & input.tel.attrs.type & input.tel.attrs.value? - & ( common.attrs.aria.implicit.textbox - | common.attrs.aria.implicit.combobox - | common.attrs.aria.role.textbox - | common.attrs.aria.role.combobox - )? - ) + & ( + ( common.attrs.aria.implicit.textbox + | common.attrs.aria.role.textbox + )? + | ( input.attrs.list + & ( common.attrs.aria.implicit.combobox + | common.attrs.aria.role.combobox + )? + )? + ) + ) input.tel.attrs.type = attribute type { "tel" @@ -608,7 +615,6 @@ & input.color.attrs.type & input.color.attrs.value? & shared-input.attrs - & common.attrs.aria? ) input.color.attrs.type = attribute type { @@ -652,7 +658,6 @@ textarea.attrs &= ( shared-form.attrs.maxlength? & shared-form.attrs.minlength? - & shared-form.attrs.autofocus? & shared-form.attrs.required? & textarea.attrs.placeholder? & shared-form.attrs.dirname? @@ -664,7 +669,6 @@ & textarea.attrs.cols? ) ) - & shared-form.attrs.inputmode? & input.attrs.autocomplete.any? ) textarea.attrs.wrap.hard = @@ -701,22 +705,12 @@ button.submit.attrs &= ( shared-form.attrs.formaction? - & shared-form.attrs.autofocus? & shared-form.attrs.formenctype? & shared-form.attrs.formmethod? & shared-form.attrs.formtarget? & shared-form.attrs.formnovalidate? ) -## Complex Reset Button: