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

Compare commits

...

4 commits

Author SHA1 Message Date
Rohan Kumar
1329678af1
New note: Internet Explorer is almost dead 2022-06-15 19:49:46 -07:00
Rohan Kumar
2e213f90ac
typo 2022-06-15 19:43:37 -07:00
Rohan Kumar
2f8e5d8a4d
Use Equal Access to checl whole site 2022-06-15 19:43:01 -07:00
Rohan Kumar
a3aa0fbaaf
Hide some useless stuff
Remove visible bullets from datafeeds. Switch them to <ol> for
consistency.
Hide superfluous horizontal rules from print media.
2022-06-14 22:08:50 -07:00
11 changed files with 116 additions and 15 deletions

1
.gitignore vendored
View file

@ -11,3 +11,4 @@ public/
public_*/
.hugo_build.lock
csv/webrings.csv
results/

View file

@ -43,8 +43,13 @@ lint-css: $(CSS_DIR)/*.css
pnpm -s dlx stylelint --config linter-configs/stylelintrc.json --di --rd --rdd $(CSS_DIR)/*.css
@#csslint --quiet $(CSS_DIR)
.PHONY: lint-html
lint-html:
.PHONY: validate-json
validate-json:
jq -reM '""' $(OUTPUT_DIR)/manifest.min.*.webmanifest 1>/dev/null
jq -reM '""' $(OUTPUT_DIR)/webfinger.json 1>/dev/null
.PHONY: validate-html
validate-html:
$(VNU) --stdout --format json --skip-non-html --also-check-svg $(OUTPUT_DIR) | sh scripts/filter-vnu.sh
.PHONY: hint
@ -53,7 +58,7 @@ hint: hugo .hintrc-local
rm .hintrc-local
.PHONY: lint-local
lint-local: lint-css lint-html
lint-local: validate-html validate-json lint-css
# dev server, includes future and draft posts
.PHONY: serve

View file

@ -19,12 +19,16 @@ hint-online:
hint --config linter-configs/hintrc -f codeframe $(URL)
lighthouse:
mkdir -p $(CHROME_PROFILE)
CHROME_PATH=$(CHROME_PATH) CHROME_PROFILE=$(CHROME_PROFILE) JS_FLAGS='' lighthouse $(URL) $(LIGHTHOUSE_ARGS)
CHROME_PATH=$(CHROME_PATH) CHROME_PROFILE=$(CHROME_PROFILE) JS_FLAGS='' lighthouse $(URLS) $(LIGHTHOUSE_ARGS)
rm -rf $(CHROME_PROFILE)
redbot:
redbot_cli -a $(URL)
axe:
axe $(URLS) --chrome-options $(CHROME_FLAGS_COMMA) --chromedriver-path=$(CHROMEDRIVER_PATH) --show-errors
equal-access:
@echo $(URLS) | tr ' ' '\n' >urls.txt
achecker --reportLevels violation,recommendation,potentialrecommendation urls.txt
rm urls.txt
all: lighthouse hint-online

View file

@ -118,7 +118,7 @@ html {
}
/* Compensate for misalignment and wasted space caused by padding
* and margin adjustments in nav children made to meet SC 2.5.5
* and margin adjustments in nav children made to meet SC 2.5.5
* Also prevent overlapping outlines on focus */
/* We've increased the padding for dt > a, but dt without a link
@ -293,6 +293,12 @@ input[type="hidden"] {
display: none;
}
/* Remove list style from data feeds. */
main[itemtype="https://schema.org/DataFeed"] > ol {
padding: 0;
list-style-type: none;
}
/* Narrow screens: long words can cause content to flow out of the
* viewport, triggering horizontal scrolling. Allow breaking words in
* content I don't control (comments, names). For content I do control,

View file

@ -19,6 +19,9 @@
h2 + a,
/* You can't navigate in a printout. */
footer,
/* splitting up sections with <hr> is unnecesary if those
* sections are removed */
body > hr,
nav a:not([rel="home"]) span {
display: none;
}

View file

@ -0,0 +1,19 @@
---
title: "Internet Explorer is almost gone"
date: 2022-06-15T19:49:39-07:00
replyURI: "https://social.treehouse.systems/@ayushnix/108482319254719524"
replyTitle: "There's no good reason to use Internet Explorer anywhere."
replyType: "SocialMediaPosting"
replyAuthor: "Ayush Agarwal"
replyAuthorURI: "https://microblog.ayushnix.com/"
---
I want to agree, with one caveat: if you're a government or healthcare website you might still want to test with IE-mode to make sure critical functionality is at least _usable_. There are still companies that require you to use their sites in Internet Explorer with compatibility mode (emulates either IE 7 or IE 5, depending on some properties of the markup/headers). [QuickBooks Desktop 2022](https://quickbooks.intuit.com/learn-support/en-us/help-article/install-products/system-requirements-quickbooks-desktop-2022/L9664spDA_US_en_US) and [PEACH](https://www.theregister.com/2022/01/07/defra_peach_only_works_internet_explorer/). And as long as some software requires IE and there exist people who want to use one browser for everything, there will be people who set it as their default browser.
You'll probably need to support it if you have a log-in page that can be summoned when someone uses you as an OAuth provider; lots of software uses IE libraries to render the log-in window, and those aren't going anywhere. Internet Explorer isn't in Windows 11, but the `.dll` files for this are.
IE is still supported for <abbr title="Long Term Support Channel">LTSC</abbr> and government editions of Windows, and on Windows 7 <abbr title="Extended Security Updates">ESU</abbr>.
I'm not really concerned with IE support, but I test with IE-mode in Edge sometimes. I look up any breakages to see whether they are known to be non-standard IE quirks. If they aren't known quirks, I try to land a standards-compliant fix. The main thing I look for isn't nonstandard behavior, but missing features.
In other words, I test in IE to make sure my site is robust and uses progressive enhancement, not because I actually want it to work perfectly in IE. The only IE problem in my site is SVG rendering (a perfectly compliant SVG shrunk to a smaller size in HTML retains its original size in IE, but cropped with hidden overflow) and a lack of support for `<details>`. Turns out, basically every independent, non-mainstream, currently-active browser engine lacks `<details>` support except for Servo, so I might have to start looking into fallback approaches.

View file

@ -12,7 +12,7 @@ I think this post is correct, strictly speaking. I also feel like it misses the
Lots of people are less concerned with avoiding identification than they are with reducing the amount of data collected about them. For example, if they sign into an account that's linked to their real identity, they fully expect to be identified by the site. However, if the site contains Facebook and Google trackers, they would rather not run those because they harm the user rather than help.
To say that this is not a perfect solution would be an understatement. But when it comes to meeting the goals of such a user, content blocking isn't useless. It straddles the gray area between quality-of-life improvements (blocking content makes pages less unpleasant and heavy) and slight unobtrusive privacy improvements (most nowadays sites outsource most of their tracking to known well-known third parties).
To say that this is not a perfect solution would be an understatement. But when it comes to meeting the goals of such a user, content blocking isn't useless. It straddles the gray area between quality-of-life improvements (blocking content makes pages less unpleasant and heavy) and slight unobtrusive privacy improvements (the majority of sites nowadays still outsource most of their tracking to well-known third parties).
The ideal approach is obviously to use something like the Tor Browser's "Safest" mode (or perhaps the "safer" mode in a Whonix VM), which doesn't rely on badness enumeration. On that I agree. I personally switch between the Tor Browser for anonymous browsing (anonymity), Chromium for Web apps (security), and Firefox for general non-anonymous browsing (convenience and quality-of-life). Blocking trackers would not make sense for browsing anonymously, but is a slight improvement for non-anonymous browsing. Badness enumeration is of course counterproductive when trying to be fully anonymous.

View file

@ -5,7 +5,7 @@
<p role="doc-tip">
Timestamp format: <code>YYYY-MM-DD HH:MM</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite>
</p>
<ul>
<ol>
{{ $bookmarks := getJSON "https://seirdy.one/data/bookmarks.json" -}}
{{ range sort $bookmarks "tags" "desc" -}}
{{ $bookmark := . -}}
@ -43,6 +43,6 @@
</article>
</li>
{{- end }}
</ul>
</ol>
</main>
{{ end }}

View file

@ -1,10 +1,9 @@
{{ define "main" -}}
<main itemprop="mainEntity" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/DataFeed">
<h1 class="p-name" itemprop="name headline" id="notes">Notes</h1>
<p>This is my microblog. These are my short informal entries, sorted by date (newest first). For longer entries, <a href="../posts/">see my blog</a>.</p>
<p>An <a href="./atom.xml">Atom</a> feed is available, containing the full text of all my notes. A legacy <a href="./index.xml">RSS</a> feed also exists.</p>
<p>This is my microblog, containing short informal entries. <a href="../posts/">See my blog</a> for longer entries. An <a href="./atom.xml">An Atom feed</a> contains the full text of all my notes.</p>
<p role="doc-tip">
Timestamp format: <code>YYYY-MM-DD HH:MM:SS</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite>
Timestamp format: <code>YYYY-MM-DD HH:MM:SS</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite>. Sorted newest to oldest.
</p>
<ol>
{{- $posts := (where site.RegularPages "Section" "notes") -}}

View file

@ -3,10 +3,9 @@
{{- $isStandalone = true -}}
{{- end -}}
{{- if $isStandalone -}}
<main itemprop="mainEntity" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/CompleteDataFeed">
<main itemprop="mainEntity" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/DataFeed">
<h1 class="p-name" itemprop="name headline" id="posts">Posts</h1>
<p>These are all of my posts, sorted by date (newest first).</p>
<p>An <a href="./atom.xml">Atom</a> feed is available, containing the full text of all my posts. A legacy <a href="./index.xml">RSS</a> feed also exists.</p>
<p>These are all of my long-form posts. <a href="./atom.xml">An Atom feed</a> contains the full text of all my posts.</p>
{{- else -}}
<section class="h-feed hfeed" itemprop="hasPart" itemscope="" itemtype="https://schema.org/DataFeed">
<h2 class="p-name" itemprop="name" id="posts">Posts</h2>
@ -14,7 +13,7 @@
{{- end }}
<p>I edit some of these posts quite often; some are updated indefinitely. Check the “updated” timestamps.</p>
<p role="doc-tip">
Timestamp format: <code>YYYY-MM-DD</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite> and <cite><a href="https://xkcd.com/1179/">ISO 8601</a></cite>
Timestamp format: <code>YYYY-MM-DD</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite> and <cite><a href="https://xkcd.com/1179/">ISO 8601</a></cite>. Sorted newest to oldest.
</p>
<ol>
{{- $posts := (where site.RegularPages "Section" "posts") -}}

65
scripts/bin/check-whole-site Executable file
View file

@ -0,0 +1,65 @@
#!/usr/bin/env dash
set -e -u
# the name of this program
progname="$(basename "${0}")"
help_text="Usage:
Validate the site's markup, CSS, and accessibility.
Uses xmllint to to check well-formedness and the Nu HTML Checker to
check (X)HTML5 and CSS validity on every markup file (inc. HTML, XHTML,
SVG). (xmllint is only relevant if you're using XML syntax).
Lints source CSS files with stylelint.
Uses both axe-core and the IBM Equal Access Checker to test
accessibility on every page in the sitemap.
Options:
-h Print this help and exit
-b Base URL of site
"
# TODO: add the following:
# - check broken internal links
# - check broken webring links
# - validate JSON (web app manifest, webfinger)
usage() {
printf '%s' "${help_text}"
}
# when the user passess bad args, send a msg to stderr and exit
# usage: bad_option <option> <reason>
bad_option() {
echo "${progname}: option ${1}: ${2}" >&2
usage >&2
exit 1
}
base_url='http://localhost:8089/'
while getopts "hb" flags; do
case ${flags} in
h)
usage
exit 0
;;
b)
base_url="$1"
shift
;;
*)
bad_option "${flags}" 'invalid option'
exit 1
;;
esac
done
make -j1 HUGO_FLAGS=-DF HUGO_BASEURL="$base_url" clean hugo xhtmlize lint-html
make -j2 -f Makefile.online lint-css axe equal-access URLS="$(curl "$base_url/sitemap.xml" | htmlq loc -t | rg -v '/search/$' | tr '\n' ' ')"
# vi:ft=sh