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="trans the world">
|
||||
<meta property="og:title" content="trans the world | 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}`);
|
||||
@ -1495,47 +1495,47 @@ export { HeadingAnchors }</script>
|
||||
<ol id="postlist">
|
||||
|
||||
<li class="post">
|
||||
<a class="postlink" href="/gender-as-a-proxy-variable/">
|
||||
<h2 data-ha-exclude="" id="gender-as-a-proxy-variable">gender as a proxy variable </h2>
|
||||
<a class="postlink" href="/proud-dad-wallet/">
|
||||
<h2 data-ha-exclude="" id="proud-dad-wallet">proud dad wallet </h2>
|
||||
|
||||
<img src="/img/gender-zine-cover.png" alt="Part of a scan of the cover of my zine, Gender as a Proxy Variable. It shows the title and a bit of handsewn binding." loading="lazy" decoding="async" width="1000" height="444">
|
||||
<img src="/img/proud-dad-wallet.jpg" alt="A brown leather wallet with a subtle trans flag stitching across the top." loading="lazy" decoding="async" width="1000" height="750">
|
||||
|
||||
<ul class="postlist-tags">
|
||||
|
||||
<li>leather</li>
|
||||
|
||||
<li>gender</li>
|
||||
|
||||
<li>zine</li>
|
||||
|
||||
</ul>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="post">
|
||||
<a class="postlink" href="/greeting-loons/">
|
||||
<h2 data-ha-exclude="" id="greeting-loons">greeting loons </h2>
|
||||
<a class="postlink" href="/become-unbutterable/">
|
||||
<h2 data-ha-exclude="" id="become-unbutterable">become unbutterable </h2>
|
||||
|
||||
<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">
|
||||
<img src="/img/become-unbutterable.jpg" alt="3 copies of the same stamp in orange ink are spread out next to the hand carved rubber stamp they were made from. They show a cat lying on his back with paws curled, holding a butter knife in his mouth. Text around the cat reads, in all caps, 'become unbutterable.'" loading="lazy" decoding="async" width="1000" height="562">
|
||||
|
||||
<ul class="postlist-tags">
|
||||
|
||||
<li>card</li>
|
||||
|
||||
<li>print</li>
|
||||
|
||||
<li>highlight</li>
|
||||
|
||||
</ul>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="post">
|
||||
<a class="postlink" href="/fd-signifier-and-oppositional-sexism/">
|
||||
<h2 data-ha-exclude="" id="fd-signifier-and-oppositional-sexism">fd signifier & oppositional sexism </h2>
|
||||
<a class="postlink" href="/congrats-on-the-gay/">
|
||||
<h2 data-ha-exclude="" id="congrats-on-the-gay">congrats on the gay </h2>
|
||||
|
||||
<img src="/img/sheep.jpg" alt="Image unrelated to post. A mama sheep with two babies curled up next to her in a grassy field." loading="lazy" decoding="async" width="1000" height="450">
|
||||
<img src="/img/congrats-on-the-gay.jpg" alt="A greeting card reading, in black. 'Congrats on the,' and then, in rainbow, 'Gay!'" loading="lazy" decoding="async" width="1000" height="750">
|
||||
|
||||
<ul class="postlist-tags">
|
||||
|
||||
<li>print</li>
|
||||
|
||||
<li>card</li>
|
||||
|
||||
<li>gender</li>
|
||||
|
||||
</ul>
|
||||
@ -1573,6 +1573,6 @@ export { HeadingAnchors }</script>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- This page `/trans-the-world/` was built on 2026-05-04T04:19:11.952Z -->
|
||||
<!-- This page `/trans-the-world/` was built on 2026-05-04T15:35:06.319Z -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user