Compare commits

..

1 Commits

Author SHA1 Message Date
Alexander Whitestone
f6faf21ad9 fix(ci): Repair a11y workflow after game.js removal (#100)
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Successful in 2s
Smoke Test / smoke (pull_request) Failing after 3s
The a11y.yml workflow referenced game.js which was removed in PR #92.
Updated to validate the current file layout:

- ARIA attributes: scan all js/*.js files (not single game.js)
- ARIA roles: index.html (unchanged)
- Syntax check: all js/*.js files with node -c

Fixes #100
2026-04-13 03:42:15 -04:00
2 changed files with 34 additions and 14 deletions

View File

@@ -10,18 +10,46 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Validate ARIA Attributes in game.js
- name: Validate ARIA Attributes in JS
run: |
echo "Checking game.js for ARIA attributes..."
grep -q "aria-label" game.js || (echo "ERROR: aria-label missing from game.js" && exit 1)
grep -q "aria-valuenow" game.js || (echo "ERROR: aria-valuenow missing from game.js" && exit 1)
grep -q "aria-pressed" game.js || (echo "ERROR: aria-pressed missing from game.js" && exit 1)
echo "Checking JS files for ARIA attributes..."
JS_FILES=$(find js -name '*.js' 2>/dev/null)
if [ -z "$JS_FILES" ]; then
echo "WARNING: No JS files found in js/"
exit 0
fi
ARIA_FOUND=0
for f in $JS_FILES; do
if grep -q "aria-" "$f" 2>/dev/null; then
echo " ✓ $f has ARIA attributes"
ARIA_FOUND=1
fi
done
if [ "$ARIA_FOUND" -eq 0 ]; then
echo "ERROR: No ARIA attributes found in any JS file"
exit 1
fi
echo "PASS: ARIA attributes present"
- name: Validate ARIA Roles in index.html
run: |
echo "Checking index.html for ARIA roles..."
if [ ! -f index.html ]; then
echo "ERROR: index.html not found"
exit 1
fi
grep -q "role=" index.html || (echo "ERROR: No ARIA roles found in index.html" && exit 1)
echo "PASS: ARIA roles found in index.html"
- name: Syntax Check JS
run: |
node -c game.js
echo "Checking JS syntax..."
FAIL=0
for f in $(find js -name '*.js' 2>/dev/null); do
node -c "$f" 2>/dev/null && echo " ✓ $f" || { echo " ✗ $f SYNTAX ERROR"; FAIL=1; }
done
if [ "$FAIL" -eq 1 ]; then
echo "ERROR: JS syntax errors found"
exit 1
fi
echo "PASS: All JS files parse"

View File

@@ -86,8 +86,6 @@ body{background:var(--bg);color:var(--text);font-family:'SF Mono','Cascadia Code
#drift-ending .ending-quote{color:var(--dim);font-style:italic;font-size:11px;border-left:2px solid #f44336;padding-left:12px;margin:20px 0;text-align:left}
#drift-ending button{margin-top:20px;background:#1a0808;border:1px solid #f44336;color:#f44336;padding:10px 24px;border-radius:4px;cursor:pointer;font-family:inherit;font-size:11px}
#drift-ending button:hover{background:#2a1010}
#phase-transition{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(8,8,16,0.95);z-index:95;justify-content:center;align-items:center;flex-direction:column;text-align:center;padding:40px;pointer-events:none}
#phase-transition.active{display:flex}
#toast-container{position:fixed;top:16px;right:16px;z-index:200;display:flex;flex-direction:column;gap:6px;pointer-events:none;max-width:320px}
.toast{pointer-events:auto;padding:8px 14px;border-radius:6px;font-size:11px;font-family:inherit;line-height:1.4;animation:toast-in 0.3s ease-out;opacity:0.95;border:1px solid;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.toast.fade-out{animation:toast-out 0.4s ease-in forwards}
@@ -274,12 +272,6 @@ The light is on. The room is empty."
</div>
</div>
<div id="phase-transition">
<div class="pt-phase" style="font-size:12px;color:var(--dim);letter-spacing:4px;margin-bottom:12px">PHASE</div>
<div class="pt-name" style="font-size:28px;font-weight:300;color:var(--gold);letter-spacing:4px;text-shadow:0 0 40px #ffd70044;margin-bottom:8px"></div>
<div class="pt-desc" style="font-size:12px;color:var(--dim);font-style:italic;max-width:400px"></div>
</div>
<div id="toast-container"></div>
<div id="custom-tooltip"></div>
</body>