PR2: audit a11y - reduced-motion, tap>=44px, aria pe progres+dpad
Audit faptic (masurat) pe 5 motoare + campanie. Deja OK din restyle S3: tap targets (arcade 56x52, classic 44/48, chat 44), contrast (terminal .dim 9.4:1, classic hint 6:1), focus/keyboard (butoane reale, navigare cu sageti). Reparat: - reduced-motion (lacune): .confetti display:none in classic + SNIP.baseCss + campanie; flipin final in SNIP.finalCss (#fOverlay .fword span) + campanie (#fin-word span); dt-blink in campanie. (pop/flip/shake/bin/tile-pop/tp/ door-glow/crt-flicker erau deja acoperite.) flipin/pop au 'backwards' fill -> animation:none le revine la starea vizibila, nu raman ascunse. - tap: overworld dpad 42x42 -> 44x44 (singura tinta sub prag). - aria: #dots role=group+label; fiecare dot role=img cu aria-label ce reflecta starea (neinceputa/in curs/rezolvata) via setDot; dpad arcade+overworld cu aria-label (Sus/Jos/Stanga/Dreapta/Pune bomba); spacere .sp aria-hidden. Test nou smoke #9c (emulateMedia reducedMotion -> confetti display:none; tap>=44px pe dpad; aria dinamic pe dots). 26/26. Demo-uri regenerate (terminal neatins - nu foloseste SNIP base/final). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }
|
||||
.shake { animation: shake .4s ease; }
|
||||
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
|
||||
@media (prefers-reduced-motion: reduce){ .confetti{ display:none !important; } .shake{ animation:none !important; } }
|
||||
#mOverlay { display: none; position: fixed; inset: 0; background: rgba(8,4,20,.72); z-index: 20; align-items: center; justify-content: center; padding: 16px; }
|
||||
#mCard { width: 100%; max-width: 460px; background: #221440; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; padding: 22px; color: #fff; font-family: system-ui, sans-serif; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
|
||||
#mCard .mtitle { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #c4b5fd; font-weight: 700; }
|
||||
@@ -49,6 +50,7 @@
|
||||
#fOverlay .fword { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
|
||||
#fOverlay .fword span { width: 44px; height: 52px; border-radius: 10px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; animation: flipin .6s ease backwards; }
|
||||
@keyframes flipin { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }
|
||||
@media (prefers-reduced-motion: reduce){ #fOverlay .fword span{ animation:none !important; } }
|
||||
#fOverlay p { color: rgba(255,255,255,.8); line-height: 1.5; }
|
||||
#fOverlay button { font: inherit; cursor: pointer; border: none; border-radius: 10px; padding: 12px 18px; font-weight: 700; background: var(--accent); color: #fff; width: 100%; }
|
||||
</style>
|
||||
@@ -58,7 +60,7 @@
|
||||
<div id="hud"><span id="hudStep"></span><span id="hudStars"></span><div id="hudLetters"></div></div>
|
||||
<canvas id="cv"></canvas>
|
||||
<div class="help">Sageti / WASD = misca, Space sau 💣 = bomba. Sparge cutiile, evita dusmanii. Usile rosii = intrebari; cufarul auriu = scaparea.</div>
|
||||
<div id="dpad"><button data-d="L">◀</button><button data-d="U">▲</button><button data-d="D">▼</button><button data-d="R">▶</button><button id="btnBomb">💣</button></div>
|
||||
<div id="dpad"><button data-d="L" aria-label="Stanga">◀</button><button data-d="U" aria-label="Sus">▲</button><button data-d="D" aria-label="Jos">▼</button><button data-d="R" aria-label="Dreapta">▶</button><button id="btnBomb" aria-label="Pune bomba">💣</button></div>
|
||||
<div id="goOverlay"><div id="goCard"><div id="goMsg"></div><button id="goRestart">Incearca din nou</button></div></div>
|
||||
<div id="mOverlay"><div id="mCard">
|
||||
<div class="mtitle" id="mTitle"></div>
|
||||
|
||||
Reference in New Issue
Block a user