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="coming out">
|
||||
<meta property="og:title" content="coming out | 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,10 +1495,10 @@ export { HeadingAnchors }</script>
|
||||
<ol id="postlist">
|
||||
|
||||
<li class="post">
|
||||
<a class="postlink" href="/slightly-weird-man-club/">
|
||||
<h2 data-ha-exclude="" id="slightly-weird-man-club">slightly weird man club </h2>
|
||||
<a class="postlink" href="/trans-the-world/">
|
||||
<h2 data-ha-exclude="" id="trans-the-world">trans the world </h2>
|
||||
|
||||
<img src="/img/slightly-weird-man-club-print.jpg" alt="A print that reads 'slightly weird man club' in a nonbinary flag colored gradient" loading="lazy" decoding="async" width="1000" height="750">
|
||||
<img src="/img/trans-the-world-print.jpg" alt="A print that reads 'trans the world' surrounding an image of a globe and a trans symbol. It's in a ping-to-blue gradient." loading="lazy" decoding="async" width="1000" height="750">
|
||||
|
||||
<ul class="postlist-tags">
|
||||
|
||||
@ -1513,34 +1513,32 @@ export { HeadingAnchors }</script>
|
||||
</li>
|
||||
|
||||
<li class="post">
|
||||
<a class="postlink" href="/lupine/">
|
||||
<h2 data-ha-exclude="" id="lupine">lupine </h2>
|
||||
<a class="postlink" href="/hair/">
|
||||
<h2 data-ha-exclude="" id="hair">hair </h2>
|
||||
|
||||
<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">
|
||||
<img src="/img/hair-print.jpg" alt="A print in black ink of belly hair." loading="lazy" decoding="async" width="1000" height="710">
|
||||
|
||||
<ul class="postlist-tags">
|
||||
|
||||
<li>print</li>
|
||||
|
||||
<li>card</li>
|
||||
|
||||
<li>shirt</li>
|
||||
<li>gender</li>
|
||||
|
||||
</ul>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="post">
|
||||
<a class="postlink" href="/not-a-drill/">
|
||||
<h2 data-ha-exclude="" id="not-a-drill">not a drill </h2>
|
||||
<a class="postlink" href="/proud-dad-wallet/">
|
||||
<h2 data-ha-exclude="" id="proud-dad-wallet">proud dad wallet </h2>
|
||||
|
||||
<img src="/img/not-a-drill-print.jpg" alt="A print in dark teal ink depicting a power drill with text in cursive below that reads 'ceci n'est pas un exercice' or 'this is not a drill'" loading="lazy" decoding="async" width="1000" height="750">
|
||||
<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>print</li>
|
||||
<li>leather</li>
|
||||
|
||||
<li>shirt</li>
|
||||
<li>gender</li>
|
||||
|
||||
</ul>
|
||||
</a>
|
||||
@ -1577,6 +1575,6 @@ export { HeadingAnchors }</script>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- This page `/coming-out/` was built on 2026-05-04T04:19:11.946Z -->
|
||||
<!-- This page `/coming-out/` was built on 2026-05-04T15:35:06.311Z -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user