From 3a1503154f1162b594d2b016fb19506d9eeaf51e Mon Sep 17 00:00:00 2001
From: Johann Birnick <6528009+jbirnick@users.noreply.github.com>
Date: Mon, 6 Jan 2025 05:13:53 -0800
Subject: [PATCH] Basic HTML `heading` test (#5619)
---
tests/ref/html/heading-html-basic.html | 30 ++++++++++++++++++++++++++
tests/suite/model/heading.typ | 21 ++++++++++++++++++
2 files changed, 51 insertions(+)
create mode 100644 tests/ref/html/heading-html-basic.html
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