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="tiny portraits">
<meta property="og:title" content="tiny portraits | 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}`);
@ -1479,10 +1479,28 @@ export { HeadingAnchors }</script>
<ol id="postlist">
<li class="post">
<a class="postlink" href="/killdeer/">
<h2 data-ha-exclude="" id="killdeer">killdeer </h2>
<a class="postlink" href="/heron/">
<h2 data-ha-exclude="" id="heron">heron </h2>
<img src="/img/killdeer-print.jpg" alt="A print of a killdeer in black ink." loading="lazy" decoding="async" width="1000" height="1333">
<img src="/img/heron-print.jpg" alt="A print in black ink of a great blue heron, leaning downwards so that eir beak is level with eir feet." loading="lazy" decoding="async" width="1000" height="1333">
<ul class="postlist-tags">
<li>print</li>
<li>card</li>
<li>shirt</li>
</ul>
</a>
</li>
<li class="post">
<a class="postlink" href="/artisans-cooperative-cards/">
<h2 data-ha-exclude="" id="artisans-cooperative-cards">artisans cooperative cards </h2>
<img src="/img/artisans-coop-cards.jpg" alt="2 white greeting cards with the Artisans Cooperative logo, a chicken. One card has a single print of the chicken in black ink, and the other has two overlapping prints in blue and red ink" loading="lazy" decoding="async" width="1000" height="1000">
<ul class="postlist-tags">
@ -1495,35 +1513,15 @@ export { HeadingAnchors }</script>
</li>
<li class="post">
<a class="postlink" href="/trans-the-world/">
<h2 data-ha-exclude="" id="trans-the-world">trans the world </h2>
<a class="postlink" href="/printmaking-paper-notes/">
<h2 data-ha-exclude="" id="printmaking-paper-notes">printmaking paper notes </h2>
<img src="/img/trans-the-world-print.jpg" alt="A print that reads &#39;trans the world&#39; surrounding an image of a globe and a trans symbol. It&#39;s in a ping-to-blue gradient." loading="lazy" decoding="async" width="1000" height="750">
<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>
<li>shirt</li>
<li>gender</li>
</ul>
</a>
</li>
<li class="post">
<a class="postlink" href="/artisans-cooperative-shirts/">
<h2 data-ha-exclude="" id="artisans-cooperative-shirts">artisans cooperative shirts </h2>
<img src="/img/artisans-coop-shirt.jpg" alt="A black tank top laid on a desk. In white ink it reads &#39;Artisans Cooperative&#39; with a print of some chickens and a quail." loading="lazy" decoding="async" width="1000" height="1333">
<ul class="postlist-tags">
<li>shirt</li>
<li>print</li>
</ul>
</a>
</li>
@ -1559,6 +1557,6 @@ export { HeadingAnchors }</script>
</footer>
<!-- This page `/tiny-portraits/` was built on 2026-05-04T04:19:11.924Z -->
<!-- This page `/tiny-portraits/` was built on 2026-05-04T15:35:06.326Z -->
</body>
</html>