176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.
HTML ai-promptsanimationcss-animationsfrontendgithub-pagesjavascriptmicrointeractionsmotion-designno-dependenciesreferencescroll-animationui-animationweb-animationweb-developmentwebgl
fix: keep Morph Transition's pages that are not on show out of the accessibility tree and mark the current page name
matin2846a0db5ec9
diff --git a/animations/03-page-transitions/morph-transition/index.html b/animations/03-page-transitions/morph-transition/index.htmlindex 63bc1927..66155270 100644--- a/animations/03-page-transitions/morph-transition/index.html+++ b/animations/03-page-transitions/morph-transition/index.html@@ -211,12 +211,13 @@morphRaf=requestAnimationFrame(tick);}- function updateNav(n){navBtns.forEach((b,i)=>b.classList.toggle('active',i===n))}- // The resting state for page n, at once: it shows, the others are hidden and the logo has its shape. A fade that is- // already running toward the same opacity keeps its own length however short --fade is, so it is cancelled too.+ function updateNav(n){navBtns.forEach((b,i)=>{b.classList.toggle('active',i===n);b.setAttribute('aria-current',i===n?'page':'false')})}+ // The resting state for page n, at once: it shows, the others are hidden and inert (out of the Tab order and the+ // accessibility tree) and the logo has its shape. A fade that is already running toward the same opacity keeps its+ // own length however short --fade is, so it is cancelled too.function showPage(n){area.style.setProperty('--fade','0ms');- pages.forEach((el,i)=>{el.classList.toggle('active',i===n);el.getAnimations().forEach(a=>a.cancel())});+ pages.forEach((el,i)=>{el.classList.toggle('active',i===n);el.inert=i!==n;el.getAnimations().forEach(a=>a.cancel())});updateNav(n);drawShape(SHAPES[PAGES[n].shape]);}@@ -241,7 +242,7 @@afterMove=then||null;// The pages fade across in 300ms, three times as long in slow motion, while the logo changes shapearea.style.setProperty('--fade',(slowTog.checked?900:300)+'ms');- pages[prev].classList.remove('active');pages[next].classList.add('active');+ pages[prev].classList.remove('active');pages[prev].inert=true;pages[next].classList.add('active');pages[next].inert=false;const target=SHAPES[PAGES[next].shape];animating=true;startMorph(currentPts,target.pts,()=>{drawShape(target);finish()});diff --git a/docs/superpowers/plans/2026-09-29-transitions-content.md b/docs/superpowers/plans/2026-09-29-transitions-content.mdindex c706303b..ec2f1b1a 100644--- a/docs/superpowers/plans/2026-09-29-transitions-content.md+++ b/docs/superpowers/plans/2026-09-29-transitions-content.md@@ -308,6 +308,7 @@ None: leave out the `details.hb-options` block.- **README Production notes:** unchanged- **Category line:** `03.03 · Page Transitions`- **Pager:** Previous: Shared Element Transition (`../shared-element-transition/`) · Next: Crossfade Transition (`../crossfade/`)+- **Final fix wave:** the pages that are not on show are `inert` (`showPage` sets it on all three pages and `navigate` on the two that swap), so a screen reader reads only the page on show and Tab cannot enter a hidden one. The name of the page on show carries `aria-current="page"` and the other two `"false"` (`updateNav`).---