Skip to content

Accessibility and performance pass - #40

Merged
leinss merged 1 commit into
releasefrom
feature/a11y-perf
Aug 17, 2026
Merged

Accessibility and performance pass#40
leinss merged 1 commit into
releasefrom
feature/a11y-perf

Conversation

@leinss

@leinss leinss commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Performance

The home page shipped profile.jpg at 3.0 MB: the 4060x5904 original,
scaled to 280px by the browser. It lived in public/, and Astro only optimises
images it can resolve at build time, so <Image> passed it straight through
with width/height attributes and nothing else.

Importing it from src/assets gives 11 kB at 1x and 54 kB at 2x.

before after
home page total 3212 kB 201 kB
largest asset 2925 kB 54 kB

Accessibility

Measured with axe-core 4.10.2 against the built site.

  • Contrast, serious. The newsletter small print and its two links sat at
    2.4:1 against the card background, against a 4.5:1 requirement, and that text
    carries the privacy notice. opacity-80 puts it near 5:1. opacity-75 was
    tried first and still failed, at 4.45:1, so this was measured rather than
    guessed.
  • Contrast, serious. The share label sat at 3.62:1, now /70.
  • No page had an h1. Every page title was a div, so work, projects,
    blog and every post failed page-has-heading-one. Titles are now h1, the
    per-entry company name and the hackathons section are h2. Tailwind's
    preflight zeroes heading sizes, so the rendering is unchanged.

Link checker

Ports scripts/check-internal-links.mjs from the consulting site into the build.
Its first run found a real broken image: src/content/projects/ethrome
referenced sharknado_3.png where the file on disk is sharknado_3.jpg. Fixed.

Test plan

  • pnpm build, pnpm lint, pnpm check:spacing pass
  • Link check: 1842 links across 82 pages, none broken
  • axe: no violations on /, /work, /projects, /blog/, an English post
    and a German post
  • axe on a post in dark mode: no violations
  • Home page weight re-measured after the change: 201 kB

…photo

Measured with axe-core against the built site, and with the resource timing
API for weight.

Performance: the home page shipped profile.jpg at 3.0 MB, the 4060x5904
original, scaled by the browser to 280px. It sat in public/, and Astro only
optimises images it can resolve at build time, so <Image> passed it through
untouched. Importing it from src/assets produces 11 kB at 1x and 54 kB at 2x.
The page went from 3212 kB to 201 kB.

Accessibility:
- The newsletter small print and its two links ran at 2.4:1 against the card,
  well under 4.5:1, and that text carries the privacy notice. opacity-80 puts
  it at about 5:1. 75 was tried first and still failed at 4.45:1.
- The share label ran at 3.62:1 and is now at /70.
- No page had an h1. Page titles were divs, so work, projects, blog and every
  post failed page-has-heading-one. Promoted to h1, with the per-entry company
  and the hackathons section as h2. Tailwind's preflight zeroes heading sizes,
  so nothing looks different.

Also adds the internal link checker from the consulting site, wired into the
build. Its first run found a genuinely broken image: a project page referenced
sharknado_3.png where the file is sharknado_3.jpg.

axe reports no violations on home, work, projects, blog index, and an English
and a German post, in both light and dark mode.
@leinss
leinss merged commit f58b22b into release Aug 17, 2026
2 checks passed
@leinss
leinss deleted the feature/a11y-perf branch August 17, 2026 16:27
leinss added a commit that referenced this pull request Aug 19, 2026
…photo (#40)

Measured with axe-core against the built site, and with the resource timing
API for weight.

Performance: the home page shipped profile.jpg at 3.0 MB, the 4060x5904
original, scaled by the browser to 280px. It sat in public/, and Astro only
optimises images it can resolve at build time, so <Image> passed it through
untouched. Importing it from src/assets produces 11 kB at 1x and 54 kB at 2x.
The page went from 3212 kB to 201 kB.

Accessibility:
- The newsletter small print and its two links ran at 2.4:1 against the card,
  well under 4.5:1, and that text carries the privacy notice. opacity-80 puts
  it at about 5:1. 75 was tried first and still failed at 4.45:1.
- The share label ran at 3.62:1 and is now at /70.
- No page had an h1. Page titles were divs, so work, projects, blog and every
  post failed page-has-heading-one. Promoted to h1, with the per-entry company
  and the hackathons section as h2. Tailwind's preflight zeroes heading sizes,
  so nothing looks different.

Also adds the internal link checker from the consulting site, wired into the
build. Its first run found a genuinely broken image: a project page referenced
sharknado_3.png where the file is sharknado_3.jpg.

axe reports no violations on home, work, projects, blog index, and an English
and a German post, in both light and dark mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant