Compare commits
1 Commits
sprint/iss
...
fix/a11y-w
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6faf21ad9 |
@@ -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"
|
||||
|
||||
13
index.html
13
index.html
@@ -114,22 +114,9 @@ body{background:var(--bg);color:var(--text);font-family:'SF Mono','Cascadia Code
|
||||
.header-btn{background:#0e0e1a;border:1px solid #333;color:#666;font-size:13px;width:28px;height:28px;border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all 0.15s;font-family:inherit}
|
||||
.header-btn:hover{border-color:#4a9eff;color:#4a9eff}
|
||||
.header-btn.muted{opacity:0.5}
|
||||
|
||||
/* Phase transition overlay */
|
||||
#phase-transition{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(10,10,30,0.92);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:9999;opacity:0;pointer-events:none;transition:opacity 0.4s ease}
|
||||
#phase-transition.active{opacity:1;pointer-events:auto}
|
||||
.pt-phase{color:#4a9eff;font-size:13px;letter-spacing:4px;text-transform:uppercase;margin-bottom:8px;font-family:monospace}
|
||||
.pt-name{color:#ffd700;font-size:28px;font-weight:700;margin-bottom:12px;text-shadow:0 0 20px rgba(255,215,0,0.4)}
|
||||
.pt-desc{color:#8899aa;font-size:13px;max-width:400px;text-align:center;line-height:1.5}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="phase-transition">
|
||||
<div class="pt-phase"></div>
|
||||
<div class="pt-name"></div>
|
||||
<div class="pt-desc"></div>
|
||||
</div>
|
||||
<div id="header" style="position:relative">
|
||||
<div class="header-btns">
|
||||
<button id="mute-btn" class="header-btn" onclick="toggleMute()" aria-label="Sound on, click to mute" title="Toggle sound (M)">🔊</button>
|
||||
|
||||
Reference in New Issue
Block a user