fix(a11y): PageList entries are h2 at the h3 size

This commit is contained in:
saberzero1 committed 2026-11-26 03:44:28 +01:00
1 parent 050586dc14
commit 52af9f1a29
2 files changed
+10 -3

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@jackyzha0/quartz": patch
---
`PageList` entries are `h2` headings under the page's `h1` (they were `h3`, which skipped a level for screen readers), at the `h3`'s size, as in `@quartz-community/folder-page` and `@quartz-community/tag-page`.
+5 -3
View File
@@ -74,14 +74,14 @@ export const PageList: QuartzComponent = ({ cfg, fileData, allFiles, limit, sort
<div class="section">
<p class="meta">{page.dates && <Date date={getDate(page)!} locale={cfg.locale} />}</p>
<div class="desc">
<h3>
<h2>
<a
href={resolveRelative(fileData.slug!, page.slug!)}
class="internal internal-link"
>
{title}
</a>
</h3>
</h2>
</div>
<ul class="tags">
{tags.map((tag) => (
@@ -104,8 +104,10 @@ export const PageList: QuartzComponent = ({ cfg, fileData, allFiles, limit, sort
}
PageList.css = `
.section h3 {
/* An h2 under the page's h1 (it was an h3, which skipped a level), at the h3's size. */
.section h2 {
margin: 0;
font-size: 1.12rem;
}
.section > .tags {