diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index f443c446b..a38c2d95c 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -1642,8 +1642,6 @@ blockListToNote opts ref blocks = do
   let noteItem' = case epubVersion of
                        Just EPUB3 -> noteItem !
                                        customAttribute "epub:type" "footnote"
-                       _ | html5  -> noteItem !
-                                       customAttribute "role" "doc-endnote"
                        _          -> noteItem
   return $ nl >> noteItem'
 
diff --git a/test/command/4235.md b/test/command/4235.md
index 5b534b6d7..ece2ce365 100644
--- a/test/command/4235.md
+++ b/test/command/4235.md
@@ -8,9 +8,8 @@ role="doc-noteref"><sup>1</sup></a></p>
 role="doc-endnotes">
 <hr />
 <ol>
-<li id="foofn1" role="doc-endnote"><p>Has a footnote.<a
-href="#foofnref1" class="footnote-back"
-role="doc-backlink">↩︎</a></p></li>
+<li id="foofn1"><p>Has a footnote.<a href="#foofnref1"
+class="footnote-back" role="doc-backlink">↩︎</a></p></li>
 </ol>
 </section>
 ```
diff --git a/test/command/7006.md b/test/command/7006.md
index 22aaf84ad..cc5ef3d0e 100644
--- a/test/command/7006.md
+++ b/test/command/7006.md
@@ -12,7 +12,7 @@ role="doc-noteref"><sup>1</sup></a></p>
 role="doc-endnotes">
 <hr />
 <ol>
-<li id="fn1" role="doc-endnote"><p>Foo:</p>
+<li id="fn1"><p>Foo:</p>
 <figure>
 <img src="/image.jpg" alt="Caption." />
 <figcaption aria-hidden="true">Caption.</figcaption>
diff --git a/test/writer.html5 b/test/writer.html5
index 23fda990f..a35d739ef 100644
--- a/test/writer.html5
+++ b/test/writer.html5
@@ -730,26 +730,24 @@ role="doc-noteref"><sup>5</sup></a></li>
 <section class="footnotes footnotes-end-of-document" role="doc-endnotes">
 <hr />
 <ol>
-<li id="fn1" role="doc-endnote"><p>Here is the footnote. It can go anywhere
-after the footnote reference. It need not be placed at the end of the
-document.<a href="#fnref1" class="footnote-back"
-role="doc-backlink">↩︎</a></p></li>
-<li id="fn2" role="doc-endnote"><p>Here’s the long note. This one contains
-multiple blocks.</p>
+<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote
+reference. It need not be placed at the end of the document.<a href="#fnref1"
+class="footnote-back" role="doc-backlink">↩︎</a></p></li>
+<li id="fn2"><p>Here’s the long note. This one contains multiple blocks.</p>
 <p>Subsequent blocks are indented to show that they belong to the footnote (as
 with list items).</p>
 <pre><code>  { &lt;code&gt; }</code></pre>
 <p>If you want, you can indent every line, but you can also be lazy and just
 indent the first line of each block.<a href="#fnref2" class="footnote-back"
 role="doc-backlink">↩︎</a></p></li>
-<li id="fn3" role="doc-endnote"><p>This is <em>easier</em> to type. Inline notes
-may contain <a href="http://google.com">links</a> and <code>]</code> verbatim
-characters, as well as [bracketed text].<a href="#fnref3" class="footnote-back"
+<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a
+href="http://google.com">links</a> and <code>]</code> verbatim characters, as
+well as [bracketed text].<a href="#fnref3" class="footnote-back"
+role="doc-backlink">↩︎</a></p></li>
+<li id="fn4"><p>In quote.<a href="#fnref4" class="footnote-back"
+role="doc-backlink">↩︎</a></p></li>
+<li id="fn5"><p>In list.<a href="#fnref5" class="footnote-back"
 role="doc-backlink">↩︎</a></p></li>
-<li id="fn4" role="doc-endnote"><p>In quote.<a href="#fnref4"
-class="footnote-back" role="doc-backlink">↩︎</a></p></li>
-<li id="fn5" role="doc-endnote"><p>In list.<a href="#fnref5"
-class="footnote-back" role="doc-backlink">↩︎</a></p></li>
 </ol>
 </section>
 </body>