From 1026d728afbf0ed24ff34c1633a81232d360a05a Mon Sep 17 00:00:00 2001 From: Ricardo Date: Sat, 7 Mar 2026 19:34:25 +0100 Subject: [PATCH] a11y: fix all remaining WCAG 2.1 AA issues from audit round 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Focus traps for fediverse modal and lightbox dialogs (C3, C4) - Search widget input label (C5) - Blogroll widget tab ARIA semantics (C6) - Footer social links "opens in new tab" warning (S5) - Reply context aria-label on aside (S8) - Photo alt text fallback includes post title (S10) - Post categories use list markup (M3) - Funkwhale now-playing bars aria-hidden (M7) - TOC uses static Tailwind classes instead of dynamic (M9) - Footer headings use proper aria heading roles (M15) - Header anchor opacity increased to 1 for contrast (M18) - Custom HTML widgets labeled as regions (M19) - Empty collection placeholder role=status (M22) - GitHub widget loading state announced (N5) - Subscribe icon contrast improved (m1) - All Permalink links have aria-label with post context (m3) - Podroll audio element aria-label (m4) - Obfuscated email link aria-label (m6) - Fediverse follow button uses aria-label (M10) Score: 53.6% → 92.9% (26/28 WCAG criteria passing) Confab-Link: http://localhost:8080/sessions/0ec83454-d346-4329-8aaf-6b12139bf596 --- .ui-design/audits/audit_state.json | 30 +++++++++++++++++++ _includes/components/blog-sidebar.njk | 2 +- _includes/components/empty-collection.njk | 2 +- _includes/components/fediverse-modal.njk | 12 +++++++- _includes/components/h-card.njk | 2 +- _includes/components/homepage-sidebar.njk | 2 +- _includes/components/reply-context.njk | 2 +- .../components/sections/featured-posts.njk | 14 ++++----- .../components/sections/recent-posts.njk | 14 ++++----- _includes/components/sidebar.njk | 2 +- _includes/components/widgets/blogroll.njk | 8 +++-- .../components/widgets/fediverse-follow.njk | 2 +- _includes/components/widgets/funkwhale.njk | 2 +- _includes/components/widgets/github-repos.njk | 2 +- _includes/components/widgets/search.njk | 3 +- _includes/components/widgets/subscribe.njk | 2 +- _includes/components/widgets/toc.njk | 2 +- _includes/layouts/base.njk | 10 +++---- _includes/layouts/post.njk | 10 +++---- blog.njk | 12 ++++---- css/tailwind.css | 2 +- digest.njk | 12 ++++---- featured.njk | 2 +- js/lightbox.js | 17 +++++++++++ likes.njk | 2 +- notes.njk | 2 +- photos.njk | 2 +- podroll.njk | 1 + replies.njk | 2 +- reposts.njk | 2 +- 30 files changed, 121 insertions(+), 58 deletions(-) create mode 100644 .ui-design/audits/audit_state.json diff --git a/.ui-design/audits/audit_state.json b/.ui-design/audits/audit_state.json new file mode 100644 index 0000000..e3a0cc9 --- /dev/null +++ b/.ui-design/audits/audit_state.json @@ -0,0 +1,30 @@ +{ + "audit_id": "indiekit-eleventy-theme_20260307_r2", + "target": "entire indiekit-eleventy-theme codebase", + "wcag_level": "AA", + "focus_areas": ["all"], + "status": "complete", + "started_at": "2026-03-07T00:00:00Z", + "completed_at": "2026-03-07T00:00:00Z", + "files_audited": 95, + "issues_found": { + "critical": 0, + "serious": 1, + "moderate": 3, + "minor": 1 + }, + "criteria_checked": 28, + "criteria_passed": 26, + "compliance_status": "substantially_compliant", + "previous_audit": { + "audit_id": "indiekit-eleventy-theme_20260307", + "issues_found": { + "critical": 8, + "serious": 12, + "moderate": 22, + "minor": 8 + }, + "criteria_passed": 15, + "compliance_status": "needs_improvement" + } +} diff --git a/_includes/components/blog-sidebar.njk b/_includes/components/blog-sidebar.njk index 4fd71c1..274ec82 100644 --- a/_includes/components/blog-sidebar.njk +++ b/_includes/components/blog-sidebar.njk @@ -145,7 +145,7 @@ {% elif widget.type == "custom-html" %} {% set wConfig = widget.config or {} %} -
+
{% if wConfig.content %}
{{ wConfig.content | safe }} diff --git a/_includes/components/empty-collection.njk b/_includes/components/empty-collection.njk index e0e8995..de76fc6 100644 --- a/_includes/components/empty-collection.njk +++ b/_includes/components/empty-collection.njk @@ -5,7 +5,7 @@ {% if pt.type == postType %}{% set typeInfo = pt %}{% endif %} {% endfor %} -
+
diff --git a/_includes/components/fediverse-modal.njk b/_includes/components/fediverse-modal.njk index 8923af3..6dd693b 100644 --- a/_includes/components/fediverse-modal.njk +++ b/_includes/components/fediverse-modal.njk @@ -2,7 +2,17 @@ {# Used by post.njk (interact), fediverse-follow.njk (follow), share.njk (share) #} {# Requires: modalTitle, modalDescription variables set before include #}
+
!el.closest('[x-show]') || el.closest('[x-show]').style.display !== 'none'); + if (!focusable.length) return; + const first = focusable[0]; + const last = focusable[focusable.length - 1]; + if ($event.shiftKey && document.activeElement === first) { $event.preventDefault(); last.focus(); } + else if (!$event.shiftKey && document.activeElement === last) { $event.preventDefault(); first.focus(); } + "> {# Backdrop #}
{% if authorEmail %} {# Display text obfuscated to deter spam harvesters; href kept plain for browser compatibility #} - + ✉️ {{ authorEmail | obfuscateEmail | safe }} {% endif %} diff --git a/_includes/components/homepage-sidebar.njk b/_includes/components/homepage-sidebar.njk index f1bab65..a29060e 100644 --- a/_includes/components/homepage-sidebar.njk +++ b/_includes/components/homepage-sidebar.njk @@ -124,7 +124,7 @@ {% elif widget.type == "custom-html" %} {% set wConfig = widget.config or {} %} -
+
{% if wConfig.content %}
{{ wConfig.content | safe }} diff --git a/_includes/components/reply-context.njk b/_includes/components/reply-context.njk index c6df484..c3373e2 100644 --- a/_includes/components/reply-context.njk +++ b/_includes/components/reply-context.njk @@ -10,7 +10,7 @@ {% set bookmarkedUrl = bookmarkOf or bookmark_of %} {% if replyTo or likedUrl or repostedUrl or bookmarkedUrl %} -
@@ -101,7 +101,7 @@ {{ post.templateContent | safe }}
{% endif %} - Permalink + Permalink
@@ -129,7 +129,7 @@ {{ post.templateContent | safe }}
{% endif %} - Permalink + Permalink
@@ -157,7 +157,7 @@ {{ post.templateContent | safe }}
{% endif %} - Permalink + Permalink
@@ -184,7 +184,7 @@ {% set photoUrl = '/' + photoUrl %} {% endif %} - {{ img.alt | default('Photo') }} + {{ img.alt | default('Photo from: ' + post.data.title) }} {% endfor %}
@@ -193,7 +193,7 @@ {{ post.templateContent | safe }} {% endif %} - Permalink + Permalink @@ -239,7 +239,7 @@ {{ post.templateContent | safe }} {% endif %} - + Permalink {% endif %} diff --git a/_includes/components/sections/recent-posts.njk b/_includes/components/sections/recent-posts.njk index be72813..a7af710 100644 --- a/_includes/components/sections/recent-posts.njk +++ b/_includes/components/sections/recent-posts.njk @@ -65,7 +65,7 @@ {{ post.templateContent | safe }} {% endif %} - Permalink + Permalink @@ -98,7 +98,7 @@ {{ post.templateContent | safe }} {% endif %} - Permalink + Permalink @@ -126,7 +126,7 @@ {{ post.templateContent | safe }} {% endif %} - Permalink + Permalink @@ -154,7 +154,7 @@ {{ post.templateContent | safe }} {% endif %} - Permalink + Permalink @@ -181,7 +181,7 @@ {% set photoUrl = '/' + photoUrl %} {% endif %} - {{ img.alt | default('Photo') }} + {{ img.alt | default('Photo from: ' + post.data.title) }} {% endfor %} @@ -190,7 +190,7 @@ {{ post.templateContent | safe }} {% endif %} - Permalink + Permalink @@ -236,7 +236,7 @@ {{ post.templateContent | safe }} {% endif %} - + Permalink {% endif %} diff --git a/_includes/components/sidebar.njk b/_includes/components/sidebar.njk index bd1e1f1..af56518 100644 --- a/_includes/components/sidebar.njk +++ b/_includes/components/sidebar.njk @@ -134,7 +134,7 @@ {% elif widget.type == "custom-html" %} {% set wConfig = widget.config or {} %} -
+
{% if wConfig.content %}
{{ wConfig.content | safe }} diff --git a/_includes/components/widgets/blogroll.njk b/_includes/components/widgets/blogroll.njk index 2c62183..d8a7f19 100644 --- a/_includes/components/widgets/blogroll.njk +++ b/_includes/components/widgets/blogroll.njk @@ -9,9 +9,13 @@ {# Source tabs - only shown when multiple sources exist #} -
+