From d4adef025e1fb1673597279967b69175c6767eb8 Mon Sep 17 00:00:00 2001 From: PLanCompS <18308236+pdmosses@users.noreply.github.com> Date: Mon, 3 Aug 2020 08:50:04 +0200 Subject: [PATCH] Update _layouts/default.html to preserve aria-labelledby in headings Correction suggested by @allejo in comment https://github.com/pmarsceill/just-the-docs/pull/399#discussion_r464128713. Also prevents losing the aria-labelledby attribute in future updates to this snippet. --- _layouts/default.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_layouts/default.html b/_layouts/default.html index 1d41a711..3238266d 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -101,7 +101,7 @@ layout: table_wrappers {% endunless %} <div id="main-content" class="main-content" role="main"> {% if site.heading_anchors != false %} - {% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" %} + {% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %} {% else %} {{ content }} {% endif %} -- GitLab