move anchor links to aria-labelledby model
This commit is contained in:
@ -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="keffiyah fishing net pattern">
|
||||
<meta property="og:title" content="keffiyah fishing net pattern | 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}`);
|
||||
@ -1672,10 +1672,10 @@ export { HeadingAnchors }</script>
|
||||
<ol id="postlist">
|
||||
|
||||
<li class="post">
|
||||
<a class="postlink" href="/sideways-canvas-shirt/">
|
||||
<h2 data-ha-exclude="" id="sideways-canvas-shirt">sideways canvas shirt </h2>
|
||||
<a class="postlink" href="/brookes-scarf/">
|
||||
<h2 data-ha-exclude="" id="brookes-scarf">brooke's scarf </h2>
|
||||
|
||||
<img src="/img/sideways-canvas.jpg" alt="someone's torso in a knitted short sleeve shirt. the front is teal, and the bit of back we can see is mustard yellow. looking closely, it's notable that the stitches are turned 90 degrees from a standard knit garment." loading="lazy" decoding="async" width="1000" height="1338">
|
||||
<img src="/img/brooke-scarf.jpg" alt="A diaphanous knit lacework scarf draped over the back of a chair. It is split down the long way into two colors - one tinted orange and one tinted mint blue. Both colors, the orange and the blue, are held double with the same variegated gray, making the piece more cohesive. The yarn overs in the lacework create airy repeating holes." loading="lazy" decoding="async" width="1000" height="1333">
|
||||
|
||||
<ul class="postlist-tags">
|
||||
|
||||
@ -1702,17 +1702,15 @@ export { HeadingAnchors }</script>
|
||||
</li>
|
||||
|
||||
<li class="post">
|
||||
<a class="postlink" href="/butch-hands-pattern/">
|
||||
<h2 data-ha-exclude="" id="butch-hands-pattern">butch hands pattern </h2>
|
||||
<a class="postlink" href="/pink-socks/">
|
||||
<h2 data-ha-exclude="" id="pink-socks">pink socks </h2>
|
||||
|
||||
<img src="/img/butch-hands.jpg" alt="Hands wearing a pair of pink and grey gloves with convertable mitten tops." loading="lazy" decoding="async" width="1000" height="750">
|
||||
<img src="/img/pink-socks.jpg" alt="Feet propped up on a car dashboard, with a desert landscape beyond. The feet are in salmon-colored socks with black flecks, and decorative lines running down the socks." loading="lazy" decoding="async" width="1000" height="1333">
|
||||
|
||||
<ul class="postlist-tags">
|
||||
|
||||
<li>knit</li>
|
||||
|
||||
<li>highlight</li>
|
||||
|
||||
</ul>
|
||||
</a>
|
||||
</li>
|
||||
@ -1748,6 +1746,6 @@ export { HeadingAnchors }</script>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- This page `/keffiyah-fishing-net-pattern/` was built on 2026-05-04T04:19:11.932Z -->
|
||||
<!-- This page `/keffiyah-fishing-net-pattern/` was built on 2026-05-04T15:35:06.331Z -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user