From 275fcd1afb97be0312eda29310de91f6d5074639 Mon Sep 17 00:00:00 2001 From: Romain Deltour Date: Wed, 24 Apr 2019 14:35:44 +0200 Subject: [PATCH] fix: allow `doc-endnote` on `li` children of `ol` Fix #1041 --- .../epubcheck/schema/30/mod/html5/block.rnc | 2 ++ .../adobe/epubcheck/ops/OPSCheckerTest.java | 8 +++++++ .../xhtml/valid/aria-role-doc-endnote.xhtml | 22 +++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 src/test/resources/30/single/xhtml/valid/aria-role-doc-endnote.xhtml 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 e2fc74857..850e64c34 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 @@ -167,6 +167,8 @@ | common.attrs.aria.role.treeitem | common.attrs.aria.role.separator | common.attrs.aria.role.presentation + | common.attrs.aria.role.doc-biblioentry + | common.attrs.aria.role.doc-endnote )? ) oli.attrs.value = diff --git a/src/test/java/com/adobe/epubcheck/ops/OPSCheckerTest.java b/src/test/java/com/adobe/epubcheck/ops/OPSCheckerTest.java index 0fc172aa4..fc06cb9a5 100644 --- a/src/test/java/com/adobe/epubcheck/ops/OPSCheckerTest.java +++ b/src/test/java/com/adobe/epubcheck/ops/OPSCheckerTest.java @@ -169,6 +169,14 @@ public void testARIARoleOnAElemWithNoHref() EPUBVersion.VERSION_3); } + @Test + public void testARIARoleDocEndnote() + { + // test that the `doc-endnote` role is allowed where it should + testValidateDocument("xhtml/valid/aria-role-doc-endnote.xhtml", "application/xhtml+xml", + EPUBVersion.VERSION_3); + } + @Test public void testValidateXHTMLEdits001() { diff --git a/src/test/resources/30/single/xhtml/valid/aria-role-doc-endnote.xhtml b/src/test/resources/30/single/xhtml/valid/aria-role-doc-endnote.xhtml new file mode 100644 index 000000000..980684a90 --- /dev/null +++ b/src/test/resources/30/single/xhtml/valid/aria-role-doc-endnote.xhtml @@ -0,0 +1,22 @@ + + + + Test + + + +

Test

+
+

Notes

+
    +
  1. +
+
+
+

Notes

+ +
+ +