1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00

Improve webring link labels

"aria-label" doesn't translate well, so use "labelledby" instead. Source
the label from a new informational paragraph.
This commit is contained in:
Rohan Kumar 2022-05-03 21:58:52 -07:00
parent b0d6c751e2
commit e54fc42286
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -1,22 +1,21 @@
<h2 id="part-of">Webrings</h2>
<p>This site is part of some <a href="https://en.wikipedia.org/wiki/Webring">webrings</a>:</p>
<!-- <!--
Some webrings require the sending of a "Referer" header, Some webrings require the sending of a "Referer" header,
but my site has two non-canonical mirrors. Don't add those. but my site has two non-canonical mirrors. Don't add those.
--> -->{{- $refPol := "no-referrer" -}}
{{- $refPol := "no-referrer" -}}
{{- if eq site.BaseURL "https://seirdy.one/" -}} {{- if eq site.BaseURL "https://seirdy.one/" -}}
{{- $refPol = "strict-origin" -}} {{- $refPol = "strict-origin" -}}
{{ end -}} {{- end -}}
<h2 id="webrings">Webrings</h2>
<p>This site is part of some <a href="https://en.wikipedia.org/wiki/Webring">webrings</a>. A webring is a collection of sites in a circular doubly-linked list; each website links to the next and previous site in the list.</p>
{{ $webringData := after 1 (getCSV "," "/csv/webrings.csv") -}}
<p>Each of the following {{ len $webringData }} webrings has three links: the <span id="prev-name">previous site</span> in the ring, the webring homepage, and the <span id="next-name">next site</span> in the ring.</p>
<ul class="unstyled-list"> <ul class="unstyled-list">
{{- range $i, $r := after 1 (getCSV "," "/csv/webrings.csv") }} {{- range $i, $r := $webringData }}
<li> <li><p>
<p> <a href="{{- index $r 1 -}}" rel="nofollow ugc" referrerpolicy="{{ $refPol }}" aria-labelledby="prev-name"></a> ·
<a href="{{- index $r 1 -}}" rel="nofollow ugc" referrerpolicy="{{ $refPol }}" aria-label="previous site"></a> ·
<a href="{{- index $r 2 -}}">{{- index $r 0 -}}</a> · <a href="{{- index $r 2 -}}">{{- index $r 0 -}}</a> ·
<a href="{{- index $r 3 -}}" rel="nofollow ugc" referrerpolicy="{{ $refPol }}" aria-label="next site"></a> <a href="{{- index $r 3 -}}" rel="nofollow ugc" referrerpolicy="{{ $refPol }}" aria-labelledby="next-name"></a>
</p> </p></li>
</li>
{{- end -}} {{- end -}}
</ul> </ul>
<p>If you&rsquo;re part of a webring and would like me to join, just ask. I&rsquo;ll probably accept if joining only requires me to add hyperlinks to this page (no scripts, external content, or images), and if the ring doesn&rsquo;t seem to promote anything I find objectionable.</p> <p>If you&rsquo;re part of a webring and would like me to join, just ask. I&rsquo;ll probably accept if joining only requires me to add hyperlinks to this page (no scripts, external content, or images), and if the ring doesn&rsquo;t seem to promote anything I find objectionable.</p>