From 7073910a4c8b3d1dcbb194fb71c39b614bd82893 Mon Sep 17 00:00:00 2001 From: Joshua Hori Date: Tue, 28 Apr 2026 21:53:32 -0700 Subject: [PATCH 1/5] update workflow --- .github/scripts/check-video-accessibility.py | 282 +++++++++++++++++++ .github/workflows/a11y.yml | 40 ++- 2 files changed, 307 insertions(+), 15 deletions(-) create mode 100755 .github/scripts/check-video-accessibility.py diff --git a/.github/scripts/check-video-accessibility.py b/.github/scripts/check-video-accessibility.py new file mode 100755 index 00000000..813d159a --- /dev/null +++ b/.github/scripts/check-video-accessibility.py @@ -0,0 +1,282 @@ +#!/usr/bin/env python3 + +""" +Video Accessibility Checker for Jupyter Book HTML + +This script scans built HTML files (typically in _build/html) +and flags accessibility issues related to video embeds. + +Why this exists: +Automated tools like axe-core do not reliably detect: +- Missing iframe titles +- Poor iframe labeling +- Missing transcripts near videos +- Platform-based caption issues (YouTube, YuJa, Kaltura, etc.) +- Autoplay and hidden control risks + +This script supplements those gaps. + +What it checks: +1. Iframe embeds (YouTube, Vimeo, etc.) + - Missing title or aria-label (WCAG 4.1.2) + - Generic titles like "video" + - Autoplay usage (WCAG 2.2.2) + - Hidden controls (WCAG 2.1.1) + - Missing nearby transcript/caption indicators (WCAG 1.2.x) + +2. Native