Site improvements: SEO, accessibility, decoupling & design tokens#5
Merged
Conversation
Contrast (P0): white-on-accent was unreadable on the dark salmon accent — switch active topic tab, .btn-primary:hover, and playground live-tag from #fff to var(--paper) (matching the convention other accent buttons use). Accessibility: - Add a site-wide :focus-visible ring for links, buttons, and form controls - Restore a keyboard focus ring on the Title/Summary inputs (they hard- stripped outline) - Give Title/Summary accessible names via aria-label theme-color meta: drove browser chrome off prefers-color-scheme, but the site theme is data-theme (default light, manual toggle, no OS-follow). Set it from the resolved theme in the pre-paint script and update it on toggle so chrome always matches the page. Writer onboarding: - Lead the intro with email (the realistic path for non-coders); stop linking 'pull request' to /pulls, which can't accept a submission - Add a post-download panel explaining what the .zip is and the two ways to send it (email-first, PR for GitHub users); auto-dismiss on next edit - Skip saving/offering an effectively empty draft
Decoupling (for future host/backend migration): - Add SITE.org/repo/repoUrl/issuesUrl/pullsUrl/discussionsUrl derived from one org+repo constant; dedupe SITE.github vs SOCIALS.github and the two Twitter encodings into single sources - Replace ~10 hardcoded github.com/MLSysDev URLs across Footer, Comments, contact, community, contribute, index, authors, write, ArticleActions with SITE helpers; use SITE.pitchEmail in about - write portal repoUrl now points at the repo (was the org URL), fixing the guide link and the ZIP 'fork' instruction - Organization sameAs now uses SOCIALS (adds LinkedIn) Taxonomy single source of truth: - Add TOPIC_IDS + topicName() to data.ts; validate post topicId with z.enum(TOPIC_IDS) so an unknown/typo topic fails the build - Derive the display name from topicId everywhere (home, blog index, article, author page, RSS, OG image, pagefind meta) instead of the denormalized frontmatter 'topic' string, which had drifted (e.g. 'Inference' vs canonical 'Inference & Serving'); 'topic' is now optional and unused - Add optional 'updated' date to the posts schema (for dateModified)
Indexing & canonicals: - trailingSlash: 'never' so canonicals, internal links, and the sitemap all agree on the no-trailing-slash form (was split, canonical vs sitemap) - noindex the /search page and exclude it from the sitemap (thin content) New indexable surface: - /tags/[tag] archive pages for every post tag (keyword-targeted titles, CollectionPage + BreadcrumbList JSON-LD) + a /tags index; article-byline tags now link to them; /tags/* added to sitemap priorities Structured data: - BreadcrumbList JSON-LD on posts, topics, tags, authors, tools - ProfilePage + Person schema on author pages; Article authors now carry a url; BaseLayout jsonLd accepts an array Metadata: - Retarget homepage + topic-page titles/descriptions to core ML-systems keywords (drop the doubled topic phrasing); trim SITE.description; enrich thin about/contact/authors descriptions - og:image:alt + twitter:site sitewide; article:modified_time/section/tag on posts; dateModified + sitemap lastmod now honor an optional 'updated' date; add missing about/search/authors OG page images
Accessibility: - Global prefers-reduced-motion block (was honored only on /about) — neutralizes hover lifts, search-modal pop, hero fade, anchor pop, etc. - Accessible names on Figure/Gallery remove buttons (aria-label + the glyph marked aria-hidden) - Wrap the top nav in a <header> landmark Information architecture: - Hide zero-article topics on /topics and stop generating empty topic pages (no thin pages in the sitemap); consistent with the homepage - Footer 'Most read' (duplicate of /blog) → 'Tags' (also surfaces the new /tags index) - Homepage 'Read the style guide' now anchors to #style-guide - Blog empty-state copy is correct under the all-view vs a topic filter Performance: - HeroFigure hydrates client:visible instead of client:load (homepage main-thread win) - KaTeX CSS scoped to the article page + /write editor instead of the global sheet — non-math pages drop ~23KB (verified: 0 KaTeX font refs on home, present on articles)
Introduces a border-radius scale (xs/sm/md/lg/pill/circle) and a shared card hover-elevation token. Pure additions — the /tags pages use the pill token now; adopting them across existing components and consolidating the duplicated card/chip/page-header patterns is a deliberate follow-up (see PR notes) to keep visual-regression risk reviewable.
Deploying mlsystems with
|
| Latest commit: |
8af2fab
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://37944ff1.mlsystems.pages.dev |
| Branch Preview URL: | https://feature-ui-audit-batch-1.mlsystems.pages.dev |
The Table item was the only slash-menu entry without an icon; add a grid-with-header glyph so it matches the others.
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.
Site-wide improvements from a four-part audit (SEO, accessibility, code decoupling, design consistency). Everything is committed in reviewable chunks; type-check, 47 unit tests, and a production build all pass, and the changes were spot-verified in a preview build in both light and dark themes.
The site was already well-built — these are refinements, not rebuilds. Weighted toward SEO (the stated priority) and decoupling/export-readiness (for a possible future host/backend migration).
1. Accessibility & the writer flow (
9a4f8dc).btn-primary:hover, and the playground live-tag now usevar(--paper)(matching the convention other accent buttons already used). Verified in dark mode: dark text on salmon (~8:1).:focus-visiblering for links/buttons/form controls; restored a keyboard ring on the/writeTitle/Summary inputs;aria-labels on those inputs.theme-colormeta now tracks the resolveddata-theme(it was keyed toprefers-color-scheme, but the site theme isdata-theme+ localStorage, so browser chrome could mismatch the page)./pulls(which can't accept a submission); a post-download panel now explains what the.zipis and how to send it. Empty drafts no longer trigger the restore banner.2. Decoupling & taxonomy (
31ffc1e)SITE.org/repo/repoUrl/issuesUrl/pullsUrl/discussionsUrlderived from one constant; replaced ~10 hardcodedgithub.com/MLSysDevURLs across the site; dedupedSITE.github/SOCIALS.githuband the two Twitter encodings. (The/writerepoUrlalso now points at the repo, not the org — fixing the guide link and the ZIP "fork" instruction.)topicIdis validated withz.enum(TOPIC_IDS)(a typo now fails the build); display names derive fromtopicName(id)everywhere instead of the denormalizedtopicfrontmatter string, which had drifted (e.g. "Inference" vs canonical "Inference & Serving").updateddate to the post schema (feedsdateModified+ sitemaplastmod).3. SEO (
dfa0cdf)trailingSlash: 'never'so canonicals, internal links, and the sitemap all agree (they were split before)./searchis nownoindex+ excluded from the sitemap./tags/[tag]archive pages for every post tag (keyword-targeted titles,CollectionPage+BreadcrumbListJSON-LD) plus a/tagsindex; article-byline tags link to them; footer surfaces/tags.BreadcrumbListon posts/topics/tags/authors/tools;ProfilePage+Personon author pages; Article authors gained aurl.og:image:alt+twitter:sitesitewide;article:modified_time/section/tagon posts; added the missing about/search/authors OG page images.4. Performance & IA (
f8148a1)prefers-reduced-motionblock (was only on/about).HeroFigurehydratesclient:visibleinstead ofclient:load./writeeditor instead of the global sheet — non-math pages drop ~23KB (verified: 0 KaTeX font refs on the homepage, present on articles)./blog) → "Tags"; "Read the style guide" anchors to#style-guide; blog empty-state copy is correct under the all-view.5. Design tokens (
5a7a4df)--radius-*and--shadow-hoverscales (pure additions; the/tagspages use the pill token).Deliberately deferred (recommended follow-ups)
These are real audit findings I did not land here because they carry visual-regression risk best reviewed with diffs, or are larger features:
blog-h1while other pages usepage-h1. Extract shared.card/.card--interactive, a.chipbase, andPageHeader/IconLinkCard, then adopt the new--radius-*tokens. Low-risk but touches many pages — worth reviewing visually.headingsalready returned byrender(); a strong lever for a learning site.@fontsourcealready installed for OG) + fallback-metric CLS tuning.getPublishedPosts/getPostsWithAuthors+ aCOLLECTIONSconst) — the draft filter is duplicated across ~12 pages; consolidating it is the seam you'd re-point at a backend/API on a future migration.aria-activedescendantsemantics.Notes
LICENSE/READMEwere updated (all content © respective author; MIT/code split removed) per your call.