Files
timmy-config/deploy/gitea-a11y/deploy-gitea-a11y.sh
Alexander Whitestone 6b08d129b7
Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 27s
Smoke Test / smoke (pull_request) Failing after 20s
Validate Config / YAML Lint (pull_request) Failing after 15s
Validate Config / JSON Validate (pull_request) Successful in 15s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 1m8s
Validate Config / Python Test Suite (pull_request) Has been skipped
Validate Config / Shell Script Lint (pull_request) Failing after 43s
Validate Config / Cron Syntax Check (pull_request) Successful in 10s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 11s
PR Checklist / pr-checklist (pull_request) Failing after 3m21s
Validate Config / Playbook Schema Validation (pull_request) Successful in 19s
Architecture Lint / Lint Repository (pull_request) Failing after 9s
fix: Gitea a11y fixes R1-R4 from audit #492
Deployable custom template overrides for WCAG 2.1 AA compliance.

R1 (#551): Password visibility toggle on sign-in page
  - Eye icon button toggles type=password / type=text
  - Updates aria-label dynamically ("Show/Hide password")

R2 (#552): aria-required on required form fields
  - aria-required="true" on username and password inputs
  - Screen readers now properly announce required state

R3 (#553): aria-label on star/fork count links
  - aria-label="2 stars" / aria-label="0 forks"
  - Screen readers announce meaning, not just numbers

R4 (#554): <time> elements for relative timestamps
  - <time datetime="ISO8601">2 minutes ago</time>
  - Machine-readable dates for screen readers and crawlers

Closes #551, #552, #553, #554
2026-04-13 22:08:44 -04:00

58 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
# deploy-gitea-a11y.sh — Deploy Gitea a11y fixes to the Forge VPS.
#
# Applies custom template overrides for WCAG 2.1 AA compliance fixes
# identified by the accessibility audit (#492).
#
# Fixes:
# R1: Password visibility toggle on sign-in (#551)
# R2: aria-required on required form fields (#552)
# R3: aria-label on star/fork count links (#553)
# R4: <time> elements for relative timestamps (#554)
#
# Usage:
# bash deploy/gitea-a11y/deploy-gitea-a11y.sh [ssh-host]
#
# Prerequisites:
# - SSH access to the Gitea host
# - Gitea installed with custom/ directory writable
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
GITEA_HOST="${1:-root@forge.alexanderwhitestone.com}"
GITEA_CUSTOM="/var/lib/gitea/custom"
TEMPLATES_DIR="${SCRIPT_DIR}/custom/templates"
PUBLIC_DIR="${SCRIPT_DIR}/custom/public"
echo "=== Deploying Gitea a11y fixes to ${GITEA_HOST} ==="
# Upload templates
echo " [1/4] Uploading template overrides..."
rsync -avz --relative "${TEMPLATES_DIR}/" "${GITEA_HOST}:${GITEA_CUSTOM}/templates/"
# Upload public assets (if any)
if [ -d "${PUBLIC_DIR}" ] && [ "$(ls -A ${PUBLIC_DIR} 2>/dev/null)" ]; then
echo " [2/4] Uploading public assets..."
rsync -avz --relative "${PUBLIC_DIR}/" "${GITEA_HOST}:${GITEA_CUSTOM}/public/"
else
echo " [2/4] No public assets to upload"
fi
# Set permissions
echo " [3/4] Setting permissions..."
ssh "${GITEA_HOST}" "chown -R gitea:gitea ${GITEA_CUSTOM}/templates/ ${GITEA_CUSTOM}/public/ 2>/dev/null || true"
# Restart Gitea to pick up template changes
echo " [4/4] Restarting Gitea..."
ssh "${GITEA_HOST}" "systemctl restart gitea"
echo ""
echo "=== Deployed ==="
echo " R1: Password toggle on /user/sign_in"
echo " R2: aria-required on required fields"
echo " R3: aria-label on star/fork counts"
echo " R4: <time> elements on timestamps"
echo ""
echo "Verify at: https://forge.alexanderwhitestone.com/user/sign_in"