move anchor links to aria-labelledby model

This commit is contained in:
2026-05-04 08:35:44 -07:00
parent 3f9e6727de
commit 914243feb9
284 changed files with 4184 additions and 4113 deletions

View File

@ -9,7 +9,7 @@
<meta name="description" content="Lee Cattarin... on the internet!">
<link rel="alternate" href="/feed.xml" type="application/atom+xml" title="hello hello">
<meta property="og:title" content="swallowtail on snowdrops">
<meta property="og:title" content="swallowtail on snowdrops | hello hello">
<meta property="og:type" content="website">
<meta property="og:description" content="Lee Cattarin... on the internet!">
<meta property="og:site_name" content="hello hello">
@ -1281,12 +1281,12 @@ class HeadingAnchors extends HTMLElement {
}
}
}
/* no longer used, using aria-labelledby instead - see getAnchorElement
getAccessibleTextPrefix() {
// Useful for i18n
return this.getAttribute(HeadingAnchors.attributes.prefix) || "Jump to section titled";
}
*/
getContent() {
if(this.hasAttribute(HeadingAnchors.attributes.content)) {
return this.getAttribute(HeadingAnchors.attributes.content);
@ -1320,7 +1320,7 @@ class HeadingAnchors extends HTMLElement {
anchor.classList.add(HeadingAnchors.classes.anchor);
let content = this.getContent();
anchor.innerHTML = `<span class="${HeadingAnchors.classes.srOnly}">${this.getAccessibleTextPrefix()}: ${heading.textContent}</span>${content ? `<span aria-hidden="true">${content}</span>` : ""}`;
anchor.innerHTML = `<span aria-labelledby=${heading.id}>${content}</span>`; // CHANGED HERE
anchor.addEventListener("focus", e => {
let anchor = e.target.closest(`.${HeadingAnchors.classes.anchor}`);
@ -1496,30 +1496,52 @@ export { HeadingAnchors }</script>
<ol id="postlist">
<li class="post">
<a class="postlink" href="/tiny-portraits/">
<h2 data-ha-exclude="" id="tiny-portraits">tiny portraits </h2>
<a class="postlink" href="/lupine/">
<h2 data-ha-exclude="" id="lupine">lupine </h2>
<img src="/img/tiny-portrait-stamps.jpg" alt="A collage showing various small (around an inch) stamps that depict people or animals." loading="lazy" decoding="async" width="1000" height="1000">
<img src="/img/lupine-prints.jpg" alt="6 versions of a print of lupine flowers with the leaves inked in light green and the blossoms inked in a variety of blues, purples, and pinks." loading="lazy" decoding="async" width="1000" height="750">
<ul class="postlist-tags">
<li>print</li>
<li>card</li>
<li>shirt</li>
</ul>
</a>
</li>
<li class="post">
<a class="postlink" href="/pronoun-patches/">
<h2 data-ha-exclude="" id="pronoun-patches">pronoun patches </h2>
<a class="postlink" href="/greeting-loons/">
<h2 data-ha-exclude="" id="greeting-loons">greeting loons </h2>
<img src="/img/pronoun-patch.jpg" alt="Rows of the same design, a skull with a speech bubble announcing varied pronoun sets, repeat in multiple colors along a stretch of off-white fabric." loading="lazy" decoding="async" width="1000" height="562">
<img src="/img/greeting-loons.jpg" alt="A pile of hand-printed A2 size greeting cards. A loon rearing up with outstretched wings spans the front and back of the cards." loading="lazy" decoding="async" width="1000" height="750">
<ul class="postlist-tags">
<li>card</li>
<li>print</li>
<li>highlight</li>
</ul>
</a>
</li>
<li class="post">
<a class="postlink" href="/nonbinary-flag/">
<h2 data-ha-exclude="" id="nonbinary-flag">nonbinary flag </h2>
<img src="/img/nonbinary-flag-print.jpg" alt="A print of a nonbinary flag waving, with yellow, white (uninked), purple, and black stripes." loading="lazy" decoding="async" width="1000" height="750">
<ul class="postlist-tags">
<li>print</li>
<li>patch</li>
<li>card</li>
<li>gender</li>
@ -1527,20 +1549,6 @@ export { HeadingAnchors }</script>
</a>
</li>
<li class="post">
<a class="postlink" href="/printmaking-paper-notes/">
<h2 data-ha-exclude="" id="printmaking-paper-notes">printmaking paper notes </h2>
<img src="/img/killdeer.jpg" alt="Image unrelated to post. A very fluffed up killdeer stands on a rocky beach." loading="lazy" decoding="async" width="1000" height="666">
<ul class="postlist-tags">
<li>print</li>
</ul>
</a>
</li>
</ol>
</section>
@ -1572,6 +1580,6 @@ export { HeadingAnchors }</script>
</footer>
<!-- This page `/swallowtail-on-snowdrops/` was built on 2026-05-04T04:19:11.944Z -->
<!-- This page `/swallowtail-on-snowdrops/` was built on 2026-05-04T15:35:06.309Z -->
</body>
</html>