Allow heading to take focus from anchor link

This commit is contained in:
Zach Leatherman 2024-08-08 15:28:59 -05:00
parent b3351bd600
commit 5ca43c3568

View File

@ -11,6 +11,7 @@ class HeadingAnchors extends HTMLElement {
this.headings.forEach((heading) => { this.headings.forEach((heading) => {
if(!heading.querySelector("a.direct-link") || heading.hasAttribute("data-heading-anchors-optout")) { if(!heading.querySelector("a.direct-link") || heading.hasAttribute("data-heading-anchors-optout")) {
heading.append(this.anchor(heading)); heading.append(this.anchor(heading));
heading.setAttribute("tabindex", "-1");
} }
}); });
} }