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

Compare commits

...

7 commits

Author SHA1 Message Date
Rohan Kumar
d543ff8318
update sourcehut a11y 2022-06-30 12:44:02 -07:00
Rohan Kumar
778562e756
New note: Sourcehut accessibility 2022-06-30 12:38:31 -07:00
Rohan Kumar
a4f5f797b6
Fix authorship metadata 2022-06-30 08:35:05 -07:00
Rohan Kumar
cd82ce39ec
Webmentions: display reply content + a11y issues
- Display reply content in webmentions, when it's available
- Truncate titles and redundant content from webmentions
- Add note on a11y issues regarding badly-formatted webmentions from
  brid.gy's mastodon integration.
2022-06-30 08:34:16 -07:00
Rohan Kumar
8f29201ae3
Mention Gitea's ActivityPub work. 2022-06-30 09:55:15 -07:00
Rohan Kumar
a27feb58cf
New note: Praise for weird browser setups 2022-06-29 09:49:24 -07:00
Rohan Kumar
02a6321e68
New note: Re: Gite up GitHub 2022-06-30 08:59:58 -07:00
7 changed files with 93 additions and 5 deletions

View file

@ -132,6 +132,12 @@ html {
display: inline-block;
}
/* <dt> should not be closer to the previous <dd> than the following <dd>.
* That can happen in webmentions. */
dd {
padding-bottom: .25em;
}
header > nav {
margin-bottom: -1em;
}
@ -254,8 +260,11 @@ kbd {
font-weight: bold;
}
/* <ins> should not be mistaken for hyperlinks. */
ins {
/* <ins> should not be mistaken for hyperlinks.
* "note" roles should look distinct. */
ins,
[role="note"],
[role="doc-tip"] {
font-style: italic;
text-decoration: none;
}

View file

@ -0,0 +1,26 @@
---
title: "Re: Give up GitHub"
date: 2022-06-30T08:59:50-07:00
replyURI: "https://sfconservancy.org/GiveUpGitHub/"
replyTitle: "Give up GitHub"
replyType: "Article"
replyAuthor: "Software Freedom Conservancy"
replyAuthorURI: "https://sfconservancy.org/"
replyAuthorType: "Organization"
---
I might drop GitHub mirrors for new projects, but I worry that this could disproportionately cause friction among disabled users.
The main reason I currently mirror to GitHub is accessibility. The only other forge I know of that's usable with assistive technologies is Sourcehut, my primary forge. Many feel uncomfortable with Sourcehut's style of contribution and the other FOSS forges are severely lacking, so that leaves GitHub.
GitLab requires JavaScript for basic functionality, which itself is a little problematic from a FOSS perspective and very problematic from a privacy perspective: there's a reason why the Tor Browser disables JavaScript on its "Safest" mode.
> the GitLab Enterprise Edition, which is provided to the public on gitlab.com, is (like GitHub) <mark>trade-secret,</mark> proprietary, vendor-lock-in software
I agree with this statement _except_ for the "trade-secret" choice of words. The "Enterprise Edition" is source-available proprietary software.
Some things I think you should consider adding:
- Notes on CI solutions. While SourceHut and GitLab provide excellent CI, Gitea does not. Codeberg offers CI in the form of Woodpecker CI. I don't know how good Woodpecker is from an accessibility perspective, but Sourcehut's "builds" service is excellent.
- Notes on measures taken by forges to escape vendor lock-in through the network effect (I like to call this ["user domestication"]({{<relref "posts/whatsapp-and-the-domestication-of-users.md">}})). Sourcehut uses mailing lists and does not require making an account; Gitea is working on ActivityPub-based federation.

View file

@ -0,0 +1,10 @@
---
title: "Praise for weird browser setups"
date: 2022-06-30T09:49:24-07:00
---
Balancing the needs of many users is hard. The gift of having a quirky setup is it improves inclusivity by default. In addition to using mainstream browsers with and without screen readers, I browse through other means: I often read by piping Readability output (using [rdrview](https://github.com/eafer/rdrview)) through a textual browser, using non-mainstream browser engines (e.g. NetSurf), using a textual feed reader with a bespoke markup renderer (Newsboat), and using the Tor Browser's "safest" mode.
Simply getting my content to work for me will automatically make it work for a wide range of audiences. Of course, this alone isn't enough; there are others still excluded that I need to account for.
Web devs: make your setup weird. It encourages you to make your site robust, less dependent on a narrow range of implementation quirks or poorly-followed standards.

View file

@ -0,0 +1,14 @@
---
title: "Sourcehut accessibility"
date: 2022-06-30T12:38:21-07:00
replyURI: "https://social.tchncs.de/@jookia/108567653359611884"
replyTitle: "Sourcehut is pretty poor accessibility-wise too"
replyType: "SocialMediaPosting"
replyAuthor: "Jookia"
replyAuthorURI: "https://www.jookia.org/"
---
I won't pretend that the Sourcehut accessibility situation ideal, but it's usable for the most part with assistive technologies IME. From what I can tell, it doesn't have critical issues like hidden/un-focusable items, interactive widgets that don't change states, keyboard traps, etc. The only other forge that generally passes that is GitHub.
Core functionality all works, but ancillary functionality and quality-of-life could use some significant improvements. I'll file some tickets later today; they're generally easy to fix. Some that come to mind are using additional `<nav>` elements with different labels, and naming in-page heading anchors.
Edit: just saw [your thread on Sourcehut accessiblity](https://social.tchncs.de/@jookia/108567672375976987), I'll take a look.

View file

@ -2,12 +2,20 @@
{{- with .replyType -}}
{{- $schemaType = . -}}
{{- end -}}
{{- $replyAuthorType := "Person" -}}
{{- with .replyAuthorType -}}
{{- $replyAuthorType = . -}}
{{- end -}}
{{- $replyAuthorRel := "author" -}}
{{- if eq $replyAuthorType "Organization" -}}
{{- $replyAuthorRel = "publisher" -}}
{{- end -}}
<aside role="note">
Reply to <span class="h-cite in-reply-to" itemprop="about" itemscope="" itemtype="https://schema.org/{{ $schemaType }}">
<cite itemprop="name" class="p-name">
<a class="u-url" itemprop="url" href="{{ .replyURI }}">{{ .replyTitle | safeHTML}}</a>
</cite> by
<span itemprop="author" itemscope="" itemtype="https://schema.org/Person" class="h-card vcard p-author">
<span itemprop="{{ $replyAuthorRel }}" itemscope="" itemtype="https://schema.org/{{ $replyAuthorType }}" class="h-card vcard p-author">
<a itemprop="url" href="{{ .replyAuthorURI }}" class="u-url url">
<span itemprop="name" class="p-name fn n">{{ .replyAuthor }}</span></a>
</span>

View file

@ -15,6 +15,20 @@
{{ $webmentions := (getJSON $url1) | append (getJSON $url2) -}}
{{ range sort $webmentions "created_at" -}}
{{ $webmention := . -}}
{{- /* Boolean: should we should handle this webmention like a comment or a linkback? */ -}}
{{- $hasContent := and (isset $webmention "content") (gt (countrunes $webmention.content) 50) -}}
{{- $title := $webmention.title -}}
{{- /* Remove extraneous crap from Fediverse webmentions */ -}}
{{- if findRE "@Seirdy" $webmention.title -}}
{{- $title = $title | replaceRE `^@Seirdy@pleroma.envs.net(\n| )?` "" -}}
{{- /* Mastodon webmentions may include the author in the title followed by a colon; this is redundant. */ -}}
{{- if and (isset $webmention "author_name") (findRE `@` $webmention.source) (not (findRE "^https://bridg.gy" $webmention.source)) -}}
{{ $title = $title | replaceRE `^[^:]{0,20}: ?` "" }}
{{- end -}}
{{- end -}}
{{- if and ($hasContent) (gt (countrunes $webmention.title) 128) -}}
{{- $title = $webmention.title | strings.TrimSuffix "…" | truncate 128 -}}
{{- end -}}
{{- $src := $webmention.source -}}
{{- if in $wbmLinks $src -}}
{{- $src = printf "https://web.archive.org/web/0/%s" $src -}}
@ -45,9 +59,9 @@
<a class="u-url" itemprop="url" href="{{ $src }}" rel="nofollow ugc">liked</a> this
{{ else -}}
<a class="u-url" itemprop="url" href="{{ $src }}" rel="nofollow ugc">
<span itemprop="name" class="p-content p-name">
<span itemprop="name" class="p-name">
{{ if $webmention.title -}}
{{ $webmention.title | truncate 200 -}}
{{ $title | truncate 200 -}}
{{ else -}}
{{- $webmention.source | strings.TrimPrefix "https://" | strings.TrimPrefix "www." | strings.TrimRight "/" | truncate 35 -}}
{{ end -}}
@ -55,7 +69,13 @@
></a>
{{- if $webmention.author_name }}
by <span itemprop="author" itemscope="" itemtype="https://schema.org/Person" class="h-card p-author vcard"><span itemprop="name" class="p-name fn n">{{ $webmention.author_name }}</span></span>
{{- end -}}
{{- if $hasContent -}}
{{- if findRE `^https://brid.gy/[^/]*/mastodon` $webmention.source -}}
<p role="doc-tip" itemprop="accessibilitySummary">This comment may have major formatting errors that could impact screen reader comprehension.</p>
{{- end -}}
<p itemprop="articleBody" class="p-content">{{ $webmention.content | replaceRE `^@Seirdy(@pleroma.envs.net)? ?` ""}}</p>
{{- end -}}
{{- end }}
</dd>
</div>

View file

@ -37,6 +37,7 @@ sed 7d "$html_file" | xmllint --format --encode UTF-8 --noent - | sd '^\t' '' >"
| sd '</span>.span itemprop="familyName"' '</span> <span itemprop="familyName"' \
| sd '(</picture>|src="[^"]*" ?/>)<span itemprop="name" class="p-name fn n">' '$1 <span itemprop="name" class="p-name fn n">' \
| sd '([a-z])<(data|time)' '$1 <$2' \
| sd '</span>(<a[^>]*rel="(?:nofollow ugc|ugc nofollow)"(?:[^>]*)?>liked</a>)' '</span> $1' \
| sd -s '/>' ' />'
} >>"$xhtml_file"