diff --git a/tests/ref/html/heading-html-basic.html b/tests/ref/html/heading-html-basic.html
new file mode 100644
index 000000000..69a1d0172
--- /dev/null
+++ b/tests/ref/html/heading-html-basic.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+ Level 1
+
+
+ Level 2
+
+
+ Level 3
+
+
+ Level 4
+
+
+ Level 5
+
+
+ Level 6
+
+
+ Level 7
+
+
+
\ No newline at end of file
diff --git a/tests/suite/model/heading.typ b/tests/suite/model/heading.typ
index d182724c8..72dc4aa37 100644
--- a/tests/suite/model/heading.typ
+++ b/tests/suite/model/heading.typ
@@ -115,3 +115,24 @@ Not in heading
// Error: 1:19-1:25 cannot reference heading without numbering
// Hint: 1:19-1:25 you can enable heading numbering with `#set heading(numbering: "1.")`
Cannot be used as @intro
+
+--- heading-html-basic html ---
+// level 1 => h2
+// ...
+// level 5 => h6
+// level 6 => div with role=heading and aria-level=7
+// ...
+
+= Level 1
+== Level 2
+=== Level 3
+==== Level 4
+===== Level 5
+// Warning: 1-15 heading of level 6 was transformed to , which is not supported by all assistive technology
+// Hint: 1-15 HTML only supports
to , not
+// Hint: 1-15 you may want to restructure your document so that it doesn't contain deep headings
+====== Level 6
+// Warning: 1-16 heading of level 7 was transformed to , which is not supported by all assistive technology
+// Hint: 1-16 HTML only supports
to , not
+// Hint: 1-16 you may want to restructure your document so that it doesn't contain deep headings
+======= Level 7