Portfolio UX
The person chooses the look (portfolio-brief). These rules are not part of the choice: they make the site usable
for a recruiter on a phone, a keyboard user, someone sensitive to motion, someone on a slow connection.
If a chosen colour, font or effect breaks a rule, keep the intent and change the value.
Sources: one-shot-site/references/checks.md and layout.md, ui-ux-pro-max/data/ux-guidelines.csv (all
High/Critical rows), frontend-atlas/references/performance-a11y.md, and the bugs found in our five builds
(marked ⚑).
1. Read
| Rule | Value | Check |
|---|
| Text contrast | ≥ 4.5:1 body, ≥ 3:1 large text (≥ 24 px or 19 px bold) and UI borders | look.mjs contrast, audit.mjs (axe) |
| ⚑ Text on canvas, video, image | A scrim (gradient) under the text; check every screen by eye | look.mjs "over-media" |
| ⚑ Muted text on coloured cards | Re-check contrast on the card colour, not the page ground (we shipped 2.48:1) | look.mjs |
| Body size | ≥ 16 px phone, ≥ 17 px desktop; notes ≥ 15 px; only footer small print below | look.mjs "small-text" |
| Line length | 45–75 characters (max-width: 60–70ch) | by eye |
| Line height | 1.5–1.7 body, unitless | CSS |
| ⚑ Headline | ≤ 2 lines at 1440 px, ≤ 4 at 390 px | look.mjs "long-headline" |
| Colour is never the only signal | Text or icon too (e.g. ticket state "✓ Livré") | by eye |
| Two typefaces max | One display, one text | brief.json |
2. Navigate
| Rule | Value | Check |
|---|
| Anchors land below a sticky header | scroll-padding-top = header height | click every nav link |
| Skip link | First focusable element, jumps to <main> | Tab once |
| Headings | One h1, then h2 per section, no skipped levels | audit.mjs |
| Visible focus | A focus ring on every link, button, field; never outline: none without a replacement | Tab through the page |
| Tab order = visual order | | Tab through the page |
| Contact reachable in one action | Email or button visible in the header or a phone action bar | by eye at 390 px |
| Links say where they go | No "cliquez ici", no bare github.com/ | audit.mjs, reviewer |
| ⚑ No placeholders | TODO, VOTRE-, {{…}} | audit.mjs |
3. Touch and pointer
| Rule | Value | Check |
|---|
| Target size | ≥ 44×44 px for primary actions, ≥ 24×24 px minimum with spacing | look.mjs, audit.mjs |
| Hover is a bonus | Hover-only effects inside @media (hover: hover) and (pointer: fine); nothing essential on hover | resize, touch emulation |
| ⚑ Custom cursor | Fine pointer only, never hides the system cursor on touch, off with reduced motion | |
| No horizontal scroll | Content fits 320 px; long tokens (emails, URLs) overflow-wrap: anywhere | look.mjs at 390 |
| ⚑ No pinned horizontal scroll on phones | Stack the cards under 900 px | film.mjs at 390 |
4. Motion
| Rule | Value | Check |
|---|
| Reduced motion | prefers-reduced-motion: reduce → no movement, no parallax, no scroll-jacking, 3D renders one still frame, all content visible | film.mjs --reduced must be "All clear" |
| One strong moment per screen | 1–2 animated elements per view, the rest still | by eye on the film strip |
| Readable fast | Headline readable < 1 s (2 s for a showpiece) | film.mjs "slow-headline" |
| Loops have a pause | Marquees, carousels, auto-rotating content: pause button, stop on hover/focus | film.mjs notes |
| ⚑ No layout shift | CLS < 0.1; pinned sections with pinType: 'transform' if shifts appear; reserve space for late content | film.mjs "layout-shift" |
| Animate cheap properties | transform, opacity, clip-path; never width/height/top/left | motion-audit.mjs |
| Nothing hidden waiting for JS | Without JS (or if it fails), content shows (.js class gate + timeout) | disable JS |
| Flashes | Nothing flashes more than 3 times per second | by eye |
5. Speed
| Rule | Value | Check |
|---|
| First screen | LCP < 2.5 s on 4G | audit.mjs |
| 3D and heavy JS | Loaded after first paint, in its own chunk; paused off screen and in hidden tabs; pixel ratio ≤ 1.5 phone / 2 desktop | film.mjs notes, devtools |
| Fonts | Self-hosted (Fontsource), font-display: swap, preload only the display face | audit.mjs |
| Images | WebP/AVIF, sized, loading="lazy" below the fold, width/height set | audit.mjs |
| JS budget by motion level | Calme < 5 KB, Vivant < 60 KB, Spectaculaire < 300 KB gzip | build output |
6. Content and trust
| Rule | Value |
|---|
| Every fact from the CV | No invented metric, client, testimonial or link (portfolio-content) |
| Language set | <html lang="fr-FR">, French typography (espaces insécables) |
| Meta | Title "Nom : rôle à ville", description, Open Graph image |
| Works by double-click | dist-file/ (/portfolio-build) |
Verify in one pass
npm run build
node <skills>/one-shot-site/scripts/lint.mjs .
node <skills>/one-shot-site/scripts/look.mjs dist --widths 1440,390 # then LOOK at every sheet
node <skills>/one-shot-site/scripts/film.mjs dist
node <skills>/one-shot-site/scripts/film.mjs dist --reduced
node <skills>/one-shot-site/scripts/audit.mjs dist --draft # axe-core: 0 violations
node <skills>/frontend-atlas/scripts/motion-audit.mjs <url> # heavy scroll motion only
Report as a table: rule group, result, fixed, left and why. Never "c'est accessible" without the numbers.