diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 784606dd5..32a3b853b 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -684,8 +684,7 @@ blockToHtml opts (Div (ident, "section":dclasses, dkvs)
                 else id) $ t <> if null innerSecs
                                    then mempty
                                    else nl opts <> innerContents
-     else if writerSectionDivs opts || slide || not (null dclasses) ||
-              not (null dkvs)
+     else if writerSectionDivs opts || slide || not (null dclasses)
           then addAttrs opts attr
                $ secttag
                $ nl opts <> header' <> nl opts <>