Repository navigation
fix: hide not-found glyphs from screen readers and stop orphaning in-flight prefetches - #355
Merged
Merged
Conversation
…ches
The not-found illustration floats a "{", a "}" and a "/" around its
drawing. The drawing is an aria-hidden SVG, but the three glyphs are
plain text, so a screen reader read "{ } /" before "Item not found" on
the 404 page, a missing item, and an unknown user or domain.
The illustration's wrapper is now aria-hidden, so every scene stays
decorative, including ones added later. axe has no rule for stray
decorative text, so the e2e scans never caught it.
Switching tabs, or going Back from a profile or domain page, mounts a
new swipe viewer, which queues the stories ahead of it again. When one
was still downloading, the queue started it a second time and replaced
its tracked AbortController, so cancelAllPrefetches() could no longer
abort the first. Thread downloads are shared, so this cost no extra
requests, but the download kept running after the cancel, outside the
three-prefetch limit. The queue now skips a story whose prefetch is
already in flight.
useSiblingComments showed a lone panel for a comment with no parent,
"a top-level comment or deleted". On Hacker News every comment has a
parent: a top-level one's is its story, which is how swiping steps
through the other top-level comments, and a deleted one keeps its
parent too. Only a story, job, poll or poll option has none, so that
branch is a fallback real comments never reach. Its comment and tests,
and the parent-link test in CommentArticle, now say so, and the tests'
no-parent item is a story. No behavior changes there.
therealsama
force-pushed
the
fix/not-found-glyphs-and-orphaned-prefetch
branch
from
November 28, 2026 00:10
14575ea to
61a32bc
Compare
therealsama
enabled auto-merge
November 28, 2026 12:54
kplachkov
approved these changes
Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two bug fixes from an audit, each with a regression test that fails without the fix, and a corrected code comment.
What changed
{,}and/were plain text, so they were read before the "Item not found" heading.StateViewnow marks the illustrationaria-hidden.AbortController.cancelAllPrefetches()then lost track of the first download, which kept running past the three-prefetch limit.processQueuenow skips a story that's already in flight.useSiblingCommentssaid top-level and deleted comments have no parent. On HN every comment has one; only stories, jobs, polls and poll options don't (checked against the live API). The comment and the matching test names and fixtures now say so. No behavior change.Testing
npm run typecheck: passednpm run lint: passednpm run test:run: passed, 1035 testsnpm run build: passednpm run e2e -- --project=chromium --project="Mobile Chrome": 415 passed, 9 skipped (same asmain)Build and e2e ran before the final comment and test-data edits.