Improve accessibility, SEO, security, and routing robustness - #2
Open
radumarias wants to merge 1 commit into
Open
Improve accessibility, SEO, security, and routing robustness#2radumarias wants to merge 1 commit into
radumarias wants to merge 1 commit into
Conversation
- a11y: real heading elements (h1/h2/h3), <main> landmark + skip link, focusable ⌘K/reset/card controls, terminal aria-label + live region, aria-pressed theme buttons, aria-current on nav/filters, focus management on route change - SEO: meta description, Open Graph/Twitter cards, canonical, favicon, theme-color, JSON-LD Organization - security: rel="noopener noreferrer" on all target=_blank links, hardened esc() (quote escaping), safeUrl() scheme allow-list for data-derived hrefs - correctness: normalize unknown #p/<id> and #f/<key> routes, validate terminal filter command, interpolate hardcoded project counts
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.
Summary
A focused code review of
index.htmlsurfaced accessibility, SEO, security, and routing issues. This PR fixes the actionable findings. All changes are confined toindex.htmland were verified with a headless Chromium smoke test (no JS/page errors; project cards, routing, headings, and the ⌘K terminal all work).Accessibility
<h1>/<h2>/<h3>elements (retaining classes, so styling is unchanged)<main id="content">landmark and a "Skip to content" link⌘Kterminal trigger is now a<button>, the "reset filter" control is a<button>, and each project card now uses a stretched detail-link anchor with the "Open ↗" action as a real sibling link (removing invalid nested-interactive markup)aria-label) and made the terminal output a live region (role="log" aria-live="polite")aria-pressedto theme buttons andaria-currentto active nav links and filter chipsSEO
meta description, Open Graph and Twitter Card tags, canonical URL,theme-color, an inline SVG favicon (data URI), and JSON-LDOrganizationstructured dataSecurity
rel="noopener noreferrer"to alltarget="_blank"links (static and JS-generated)esc()to also escape single quotessafeUrl()scheme allow-list (https:/mailto:only) applied to data-derived hrefs andwindow.opencallsCorrectness
#p/<id>or invalid#f/<key>now cleans the URL and falls back to home /allinstead of leaving a stale hash with a desynced viewfilter <tag>command now reports an error for unknown tags instead of silently emptying the galleryNot addressed (flagged for follow-up)
helpIssuesand theEXPERIMENTSlist (the pairs appear shuffled). At least one set links to the wrong GitHub issue, but the correct numbers can't be determined without checking the live repo, so they were left unchanged.Verification
Reviewed the full diff and ran a headless Chromium (Playwright) smoke test: page has a single
<main>and an<h1>, the⌘Kcontrol is a<button>, the terminal input is labeled, clicking a card routes to#p/<id>, and bogus#p/nope/#f/bogusroutes are cleaned. No page or console JS errors (only sandbox-blocked Google Fonts network requests).Review and fixes performed via Claude Code from a Slack thread: https://syncoxiders.slack.com/archives/C0BLHUEA74K/p1785356245573589?thread_ts=1785352424.084699&cid=C0BLHUEA74K
Generated by Claude Code