Skip to content

Commit

Permalink
fix: allow doc-endnote on li children of ol
Browse files Browse the repository at this point in the history
Fix #1041
  • Loading branch information
rdeltour committed Apr 24, 2019
1 parent fa4051a commit 275fcd1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
8 changes: 8 additions & 0 deletions src/test/java/com/adobe/epubcheck/ops/OPSCheckerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Test</title>
<meta charset="UTF-8"/>
</head>
<body>
<h1>Test</h1>
<section role="doc-endnotes">
<h2>Notes</h2>
<ol>
<li role="doc-endnote"></li>
</ol>
</section>
<section role="doc-endnotes">
<h2>Notes</h2>
<ul>
<li role="doc-endnote"></li>
</ul>
</section>
</body>
</html>

0 comments on commit 275fcd1

Please sign in to comment.