Description
This rule is set to true
but I think there's some nuance around when this rule should be configured.
The rationale behind the no-duplicate-header rule is that some markdown parsers will generate anchor links from headings, and if the heading is the same, two headings in separate areas of the page will share the same anchor link. We see this issue in Primer docs.
However, on GitHub repos, the GitHub markdown parser ensures headings that share same text have unique IDs so the generated anchor links are unique even if the heading text is the same.
So I believe we wouldn't need to enforce that heading texts on a page are completely non-duplicated in other cases. I don't believe it's necessary to have completely unique heading text on a page for accessibility purposes. However, I believe there are accessibility benefits from enforcing that sibling headings are unique.
We could recommend setting siblings_only
parameter which allows heading duplication for non-sibling headings and enforces sibling headings are unique.
Could we document these nuances?