next: no console warnings as screens are pushed and gone back from
MergedThis vendors HUD at 94b9fb9. It stops late <img> load and error handlers from running once a Picture is gone. It drops aria-hidden and leaves inert on covered levels and pager side pages. It moves focus into a pushed screen and restores it on Back. It recreates the hero preload <link> per href with {#key}.
I read the diff and found no bugs. I did not run any of it.
- The
drawnflag inPictureworks as intended. It is a plain variable that flips only when the component is destroyed, so the handlers never read props after teardown. - The focus effects in
Stacklook right. Focus is saved only if it was inside the stack. Popped levels are dropped from the map, and a disconnected saved element falls back to the title. tabindex="-1"on the level and theh1is needed for programmatic focus. Check that no focus ring shows on them. That is a visual check, not something I can see in the diff.
On the focus ring: the title and the level take focus only by script, and Chrome's focus-visible heuristic matches a script's focus only where the element focused before matched it. A tap or click on a link (the user's case, and the Chromium runs here) leaves no ring on the title. A keyboard Enter shows the browser's ring on the title, which is where a keyboard user should see focus land, so I left the default styling. I didn't take a screenshot of it.
5 passed, 2 skipped
- next: no console warnings as screens are pushed and gone back from
- main
What changes
No derived_inert in the console. A screen's pictures that finish loading after the screen was gone back from no longer make Svelte warn
derived_inert. HUD'sPicturenow listens to its<img>'s load and error events only while it's drawn.No blocked aria-hidden. The screen under the one on top no longer carries
aria-hidden, and neither do a story pager's side pages. Both stayinert, which also keeps them away from the keyboard and from screen readers. A screen opened from a link or button takes focus at its title, and Back returns focus to where it was, the way a native stack navigator does.No "preloaded but not used". The hero's
<link rel="preload">is now created fresh for each screen in the app. It used to be changed in place, which fetched its href (the full size) before its new srcset said which size to use.This vendors HUD at 94b9fb9, which is
app/shellwith this one change on top. Nothing outsidevendor/hudchanges.Why
These are the console messages a signed-in Chrome user saw while browsing profiles and galleries on next.grain.social. Each has the following cause.
<img>taken out of the page keeps loading and firesloadwhen it finishes.Picture's handler read its props through Gallery's{...sized}, a{@const}of an each item that went away with the screen. The stack the user saw is the same as the one in a dev build:Gallery.sveltesized→ the spread props'get→Picture's onload →target_handler.aria-hiddenwhile the link the user tapped in it still had focus, so Chrome blocked it.inertalone hides the level from assistive technology. Moving focus into the new screen also means focus is never left in a covered level.hreffirst. Chrome fetched that full size, then fetched the srcset's size onceimagesrcsetchanged, and reported the full size as unused.How it was checked
npm run check,npm run ssrandnpm run unit(37) pass.derived_inertwarnings and both focus/aria-hidden checks.node next/check-apps.mjsand next'snpm run checkpass.vite devof thisnext/with production's HUD (signed out):derived_inertper gallery and a "Blocked aria-hidden" ona.opens/a.openundersection.level.under. Six in-app moves from a fresh cache gave 3 "preloaded but not used" warnings forfeed_fullsizeURLs.Shortcomings
content_script.jsand aren't ours.3mxq2wrysv5n5is unexplained.next/, Caddy or the containers says "Offline", and there's no service worker.tree/Stack.svelteshowed up once during the local random walk. I didn't follow it up here.Review
A quick look. Start at HUD's
web/shell/src/Stack.svelte, the focus effects.