Skip to content

feat: gør status-, advarsels- og fejlbokse mere synlige - #222

Open
martinydeAI wants to merge 1 commit into
developfrom
feature/issue-221-layout-status-palette
Open

feat: gør status-, advarsels- og fejlbokse mere synlige#222
martinydeAI wants to merge 1 commit into
developfrom
feature/issue-221-layout-status-palette

Conversation

@martinydeAI

Copy link
Copy Markdown
Collaborator

Links to issues

Closes #221

Leantime ticket: 8223.

Description

Status, warning, and error boxes were too pale to register. The palette
sat at surface-50 / border-200, which left the border at roughly 1.2–1.3:1
against the page — the box receded exactly when it was meant to interrupt.

  • Surfaces move 50 → 100, borders move 200 → 500/600.
  • Every border now clears the 3:1 non-text contrast bar against white.
  • Text keeps WCAG AA against its own surface; 6.37:1 at the tightest.
  • The responsibility notice on /assistant/new and /assistant/edit
    moves off the neutral surface onto the warning palette (8223).

Colour values and colour classes only — no markup, ARIA role, border
width, icon, or typography change.

Type Surface Border Ink Text contrast Border vs. white
info #dbeafe #3b82f6 #1e40af 7.15:1 3.68:1
success #d1fae5 #059669 #065f46 6.78:1 3.77:1
warning #fef3c7 #d97706 #92400e 6.37:1 3.19:1
danger #fee2e2 #ef4444 #991b1b 6.80:1 3.76:1

Screenshot of the result

Not included — the affected pages sit behind authentication and I could not
drive the stateless-CSRF login from the sandbox. The compiled stylesheet was
inspected instead: var/tailwind/app.built.css carries all twelve new token
values, and .bg-warning-surface / .border-warning-line / .text-warning-ink
are emitted for the responsibility box. A reviewer should eyeball the actual
pages
— this is a visual change and contrast maths is not a substitute for
looking at it.

Checklist

  • My code is covered by test cases.
  • My code passes our test (all our tests).
  • My code passes our static analysis suite.
  • My code passes our continuous integration process.

Markdown lint could not be run locally: itkdev/markdownlint's arm64 manifest
entry contains x86-64 binaries, so the container exits with exec format error
on aarch64. CI will cover it.


Details - AI specificities

Why token values rather than new classes. AlertRenderTest pins each
type's bg-*-surface border-*-line text-*-ink triple. Changing the values
behind those names keeps the contract intact, so the component, its ARIA
roles, and its tests need no edit at all. No test file is touched by this PR.

Why the responsibility box is not a <twig:Alert>. CLAUDE.md prefers the
shared component, and this box is the obvious candidate — but Alert maps
warning to role="alert", which is assertive. This notice is static page
furniture present on every load, so an assertive role would make a screen
reader interrupt on arrival every time. It stays an <aside role="note"> and
borrows the warning palette. Worth a reviewer's opinion; if you disagree, the
swap is two lines.

Deliberate side effect. The data-sensitivity pills in
templates/assistant/show.html.twig reuse these same tokens and deepen along
with the alerts. That is the intended behaviour — same signal, same strength —
but it is a visible change beyond the alert boxes and should be looked at.

Amber. #d97706 reaches 3.19:1 against white, the lowest of the four.
Pushing to amber-700 would buy more contrast at the cost of the hue reading
as brown rather than caution, so the value stands.

Verification. task test — 690 tests, 2039 assertions, green.
task test-coverage is 100% once src/DataFixtures/LocalUserFixtures.php is
excluded; that file is gitignored and untracked, so it does not exist in CI.
Twig CS Fixer and Prettier (CSS) pass. Contrast figures above were computed
with the WCAG 2.x relative-luminance formula.

Non-goals. The other Layout tickets from the same user-testing round —
8212 (stretched logo) and 8215 (CTA placement, pending a decision from
Jesper P.) — are left for follow-up on this branch's successors.

Brugertest viste at ansvarsboksen i delingsflowet forsvandt i
siden, selvom den bærer information man skal huske netop når
man deler. Samme problem gjaldt statusboksene generelt: med
surface på 50-trinnet og kant på 200-trinnet havde kanten kun
omkring 1,2-1,3:1 kontrast mod siden.

Paletten flyttes til surface 100 og kant 500/600, så hver kant
klarer 3:1-kravet til ikke-tekstkontrast mod hvid. Tekst holder
fortsat WCAG AA mod sin egen baggrund — 6,37:1 i det strammeste
tilfælde.

Ansvarsboksen på /assistant/new og /assistant/edit flyttes fra
den neutrale flade til advarselspaletten.

Kun farveværdier og farveklasser: ingen ændring af markup,
ARIA-roller, kantbredde, ikoner eller typografi, så Alert-
komponentens klassekontrakt og AlertRenderTest er urørte.

Refs #221

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

task: gør status-, advarsels- og fejlbokse mere synlige

1 participant