From 4907336d968b560e857e61ee57914e8276f6f053 Mon Sep 17 00:00:00 2001 From: rohan kumar Date: Mon, 30 Nov 2020 12:04:21 -0800 Subject: [PATCH] Add bit about alt-text, clarify page size --- content/posts/website-best-practices.gmi | 5 +++-- content/posts/website-best-practices.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/content/posts/website-best-practices.gmi b/content/posts/website-best-practices.gmi index b79d8ad..4c61eda 100644 --- a/content/posts/website-best-practices.gmi +++ b/content/posts/website-best-practices.gmi @@ -6,7 +6,7 @@ This is a "living document" that I add to as I receive feedback. I realize not everybody's going to ditch the Web and switch to Gemini or Gopher today (that'll take, like, a month at the longest). Until that happens, here's a non-exhaustive, highly-opinionated list of best practices for websites that focus primarily on text: -* Final page weight under 50kb without images, and under 200kb with images. +* Final page weight under 50kb without images, and under 200kb with images. Page weight should usually be much smaller; these are upper-bounds for exceptional cases. * Works in Lynx, w3m, links (both graphics and text mode), Netsurf, and Dillo * Works with popular article-extractors (e.g. Readability) and HTML-to-Markdown converters. This is a good way to verify that your site uses simple HTML and works with most non-browser article readers (e.g. ebook converters, PDF exports). * No scripts or interactivity (preferably enforced at the CSP level) @@ -22,7 +22,8 @@ I realize not everybody's going to ditch the Web and switch to Gemini or Gopher * Server configured to support compression (gzip, optionally zstd as well). It's a free speed boost. * Supports dark mode via a CSS media feature and/or works with most "dark mode" browser addons. More on this below. * A good score on Mozilla's HTTP Observatory -* Optimized images. More on this below. +* Optimized images. More on image optimization below. +* All images labeled with alt-text. The page should make sense without images. * Maybe HTTP/2. There are some cases in which HTTP/2 can make things slower. Run some tests to find out. => https://observatory.mozilla.org/ HTTP Observatory diff --git a/content/posts/website-best-practices.md b/content/posts/website-best-practices.md index 51586cb..30d42ac 100644 --- a/content/posts/website-best-practices.md +++ b/content/posts/website-best-practices.md @@ -23,7 +23,7 @@ I realize not everybody's going to ditch the Web and switch to Gemini or Gopher non-exhaustive, highly-opinionated list of best practices for websites that focus primarily on text: -- Final page weight under 50kb without images, and under 200kb with images. +- Final page weight under 50kb without images, and under 200kb with images. Page weight should usually be much smaller; these are upper-bounds for exceptional cases. - Works in Lynx, w3m, links (both graphics and text mode), Netsurf, and Dillo - Works with popular article-extractors (e.g. Readability) and HTML-to-Markdown converters. This is a good way to verify that your site uses simple HTML and works @@ -45,7 +45,8 @@ primarily on text: - Supports dark mode via a CSS media feature and/or works with most "dark mode" browser addons. More on this below. - A good score on Mozilla's [HTTP Observatory](https://observatory.mozilla.org/) -- Optimized images. +- Optimized images. More on image optimization below. +- All images labeled with alt-text. The page should make sense without images. - Maybe HTTP/2. There are some cases in which HTTP/2 can make things slower. Run some tests to find out.